aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-03-06 05:54:29 +0000
committerRichard M. Stallman1993-03-06 05:54:29 +0000
commitcde6d7e31691a69bdccca97e347072e6139adbd9 (patch)
tree82cc29addf2f62339df9868fddf1391356011310
parenta354518d21c9529420a7677072d6d0566f1abe5f (diff)
downloademacs-cde6d7e31691a69bdccca97e347072e6139adbd9.tar.gz
emacs-cde6d7e31691a69bdccca97e347072e6139adbd9.zip
(listify-key-sequence): New function.
-rw-r--r--lisp/subr.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index f611d007621..49aa6f3a90c 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."
198 (setq i (1+ i)))))) 198 (setq i (1+ i))))))
199 (setq scan (cdr scan))))) 199 (setq scan (cdr scan)))))
200 200
201(defun listify-key-sequence (key)
202 "Convert a key sequence to a list of events."
203 (if (vectorp key)
204 (append key nil)
205 (mapcar (function (lambda (c)
206 (if (> c 127)
207 (logxor c 8388736)
208 c)))
209 (append key nil))))
210
201(defmacro save-match-data (&rest body) 211(defmacro save-match-data (&rest body)
202 "Execute the BODY forms, restoring the global value of the match data." 212 "Execute the BODY forms, restoring the global value of the match data."
203 (let ((original (make-symbol "match-data"))) 213 (let ((original (make-symbol "match-data")))