eventp

29/10/2015

I’ve been reading “Coders At Work” lately, in the faint hope of
obsessing over something else than Emacs for a change. Things do of
course rarely go the way we plan them to, so the first chapter did of
course have to cover a famous Emacs hacker, namely Jamie Zawinski.

Somewhere in the middle of the chapter[1] he complains that Emacs
isn’t particularly elegant about events:

[…]there should be event objects instead of a list with a number in
it. Having an event object be a list with a number in it—that’s
just tasteless. It’s icky.

A pretty understandable thing to disagree on. Especially if you
consider how markers and window configurations are opaque objects for
no real reason. Not particularly consistent design if you ask me.
Surely that one mistake has been fixed in the following decade, right?

(defuneventp(obj)"True if the argument is an event object."(whenobj(or(integerpobj)(and(symbolpobj)obj(not(keywordpobj)))(and(conspobj)(symbolp(carobj))))))