aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-05-27 00:06:08 +0000
committerRichard M. Stallman1993-05-27 00:06:08 +0000
commit114137b8aa69ae69d609edc0e77dad5a67f1a72d (patch)
tree992e47d4833a9159382c5f2b543942bddd0fc8cd
parent8d117719dffa050ccc45446f9caf1a1ef63bff42 (diff)
downloademacs-114137b8aa69ae69d609edc0e77dad5a67f1a72d.tar.gz
emacs-114137b8aa69ae69d609edc0e77dad5a67f1a72d.zip
(listify-key-sequence): Avoid the constant ?\M-\200.
-rw-r--r--lisp/subr.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 591493e42fc..755f64dff61 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -230,13 +230,20 @@ The normal global definition of the character C-x indirects to this keymap.")
230 230
231;;;; Event manipulation functions. 231;;;; Event manipulation functions.
232 232
233;; This code exists specifically to make sure that the
234;; resulting number does not appear in the .elc file.
235;; The number is negative on most machines, but not on all!
236(defconst listify-key-sequence-1
237 (lsh 1 7))
238(setq listify-key-sequence-1 (logior (lsh 1 23) listify-key-sequence-1))
239
233(defun listify-key-sequence (key) 240(defun listify-key-sequence (key)
234 "Convert a key sequence to a list of events." 241 "Convert a key sequence to a list of events."
235 (if (vectorp key) 242 (if (vectorp key)
236 (append key nil) 243 (append key nil)
237 (mapcar (function (lambda (c) 244 (mapcar (function (lambda (c)
238 (if (> c 127) 245 (if (> c 127)
239 (logxor c ?\M-\200) 246 (logxor c listify-key-sequence-1)
240 c))) 247 c)))
241 (append key nil)))) 248 (append key nil))))
242 249