diff options
-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"))) |