diff options
| -rw-r--r-- | lisp/subr.el | 9 |
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 | ||