Mercurial > emacs
diff lisp/subr.el @ 2021:8b9286bffef8
(listify-key-sequence): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 06 Mar 1993 05:54:29 +0000 |
parents | 3c827b8110db |
children | 10cdd2928c7d |
line wrap: on
line diff
--- a/lisp/subr.el Sat Mar 06 02:59:13 1993 +0000 +++ b/lisp/subr.el Sat Mar 06 05:54:29 1993 +0000 @@ -198,6 +198,16 @@ (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")))