bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35238: 27.0.50; Clarify eventp behaviour with booleans


From: Eli Zaretskii
Subject: bug#35238: 27.0.50; Clarify eventp behaviour with booleans
Date: Fri, 12 Apr 2019 15:30:42 +0300

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Fri, 12 Apr 2019 12:11:01 +0100
> Cc: 35238@debbugs.gnu.org
> 
> -(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 (keywordp object)))))

Please make sure the ELisp manual is kept in sync.  Also, does this
need to be called out in NEWS?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]