diff options
| author | Richard M. Stallman | 2004-04-20 20:56:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-04-20 20:56:32 +0000 |
| commit | 5572c97f45698f0ce683444ddbdde8ac98a977a0 (patch) | |
| tree | 7b37c55ad55a13048178efc19eaba162cb92d6e8 | |
| parent | a0df7a328544a147e74011988cbdbe2d7930d27e (diff) | |
| download | emacs-5572c97f45698f0ce683444ddbdde8ac98a977a0.tar.gz emacs-5572c97f45698f0ce683444ddbdde8ac98a977a0.zip | |
(event-modifiers): Fix the criterion for ASCII control chars.
| -rw-r--r-- | lisp/subr.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 81f774bdc68..57f725fb44c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -644,14 +644,16 @@ and `down'." | |||
| 644 | (setq type (car type))) | 644 | (setq type (car type))) |
| 645 | (if (symbolp type) | 645 | (if (symbolp type) |
| 646 | (cdr (get type 'event-symbol-elements)) | 646 | (cdr (get type 'event-symbol-elements)) |
| 647 | (let ((list nil)) | 647 | (let ((list nil) |
| 648 | (or (zerop (logand type ?\M-\^@)) | 648 | (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ |
| 649 | ?\H-\^@ ?\s-\^@ ?\A-\^@))))) | ||
| 650 | (if (not (zerop (logand type ?\M-\^@))) | ||
| 649 | (setq list (cons 'meta list))) | 651 | (setq list (cons 'meta list))) |
| 650 | (or (and (zerop (logand type ?\C-\^@)) | 652 | (if (or (not (zerop (logand type ?\C-\^@))) |
| 651 | (>= (logand type 127) 32)) | 653 | (< char 32)) |
| 652 | (setq list (cons 'control list))) | 654 | (setq list (cons 'control list))) |
| 653 | (or (and (zerop (logand type ?\S-\^@)) | 655 | (if (or (not (zerop (logand type ?\S-\^@))) |
| 654 | (= (logand type 255) (downcase (logand type 255)))) | 656 | (/= char (downcase char))) |
| 655 | (setq list (cons 'shift list))) | 657 | (setq list (cons 'shift list))) |
| 656 | (or (zerop (logand type ?\H-\^@)) | 658 | (or (zerop (logand type ?\H-\^@)) |
| 657 | (setq list (cons 'hyper list))) | 659 | (setq list (cons 'hyper list))) |