diff options
| author | Stefan Monnier | 2004-05-11 03:17:45 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-05-11 03:17:45 +0000 |
| commit | 7a2937ce8a29cc4ad7cad8ca56a617c764b068bc (patch) | |
| tree | d37dd6092ccae749dacab1a993714ef0e28b3744 | |
| parent | 494bcd27cb2221a849c81c8ef0df2cc7c4c9f0a5 (diff) | |
| download | emacs-7a2937ce8a29cc4ad7cad8ca56a617c764b068bc.tar.gz emacs-7a2937ce8a29cc4ad7cad8ca56a617c764b068bc.zip | |
(eventp): Be more discriminating with integers.
| -rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 866a6f6fd7c..5302558d834 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -629,7 +629,11 @@ The normal global definition of the character C-x indirects to this keymap.") | |||
| 629 | 629 | ||
| 630 | (defsubst eventp (obj) | 630 | (defsubst eventp (obj) |
| 631 | "True if the argument is an event object." | 631 | "True if the argument is an event object." |
| 632 | (or (integerp obj) | 632 | (or (and (integerp obj) |
| 633 | ;; Filter out integers too large to be events. | ||
| 634 | ;; M is the biggest modifier. | ||
| 635 | (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1))))) | ||
| 636 | (char-valid-p (event-basic-type obj))) | ||
| 633 | (and (symbolp obj) | 637 | (and (symbolp obj) |
| 634 | (get obj 'event-symbol-elements)) | 638 | (get obj 'event-symbol-elements)) |
| 635 | (and (consp obj) | 639 | (and (consp obj) |