diff --git a/lisp/subr.el b/lisp/subr.el index bdf98979c4..8c4df5bc6c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1227,12 +1227,14 @@ listify-key-sequence c))) key))) -(defun eventp (obj) - "True if the argument is an event object." - (when obj - (or (integerp obj) - (and (symbolp obj) obj (not (keywordp obj))) - (and (consp obj) (symbolp (car obj)))))) +(defun eventp (object) + "Return non-nil if OBJECT is an input event or event object." + (or (integerp object) + (and (symbolp (if (consp object) + (setq object (car object)) + object)) + (not (booleanp object)) + (not (keywordp object))))) (defun event-modifiers (event) "Return a list of symbols representing the modifier keys in event EVENT.