diff options
author | Richard M. Stallman <[email protected]> | 1993-03-06 05:54:29 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1993-03-06 05:54:29 +0000 |
commit | cde6d7e31691a69bdccca97e347072e6139adbd9 (patch) | |
tree | 82cc29addf2f62339df9868fddf1391356011310 /lisp/subr.el | |
parent | a354518d21c9529420a7677072d6d0566f1abe5f (diff) |
(listify-key-sequence): New function.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index f611d00762..49aa6f3a90 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -198,6 +198,16 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP." (setq i (1+ i)))))) (setq scan (cdr scan))))) +(defun listify-key-sequence (key) + "Convert a key sequence to a list of events." + (if (vectorp key) + (append key nil) + (mapcar (function (lambda (c) + (if (> c 127) + (logxor c 8388736) + c))) + (append key nil)))) + (defmacro save-match-data (&rest body) "Execute the BODY forms, restoring the global value of the match data." (let ((original (make-symbol "match-data"))) |