changeset 2021:8b9286bffef8

(listify-key-sequence): New function.
author Richard M. Stallman <rms@gnu.org>
date Sat, 06 Mar 1993 05:54:29 +0000
parents 8b034dd5da14
children 9a765951a9b9
files lisp/subr.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
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")))