Commit 5572c97f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(event-modifiers): Fix the criterion for ASCII control chars.

parent a0df7a32
......@@ -644,14 +644,16 @@ and `down'."
(setq type (car type)))
(if (symbolp type)
(cdr (get type 'event-symbol-elements))
(let ((list nil))
(or (zerop (logand type ?\M-\^@))
(let ((list nil)
(char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@
?\H-\^@ ?\s-\^@ ?\A-\^@)))))
(if (not (zerop (logand type ?\M-\^@)))
(setq list (cons 'meta list)))
(or (and (zerop (logand type ?\C-\^@))
(>= (logand type 127) 32))
(if (or (not (zerop (logand type ?\C-\^@)))
(< char 32))
(setq list (cons 'control list)))
(or (and (zerop (logand type ?\S-\^@))
(= (logand type 255) (downcase (logand type 255))))
(if (or (not (zerop (logand type ?\S-\^@)))
(/= char (downcase char)))
(setq list (cons 'shift list)))
(or (zerop (logand type ?\H-\^@))
(setq list (cons 'hyper list)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment