# HG changeset patch # User Richard M. Stallman # Date 731397269 0 # Node ID 8b9286bffef83a6351dcf5a4c174fb938c1ba045 # Parent 8b034dd5da146f991b638360a89bdb22ef648902 (listify-key-sequence): New function. diff -r 8b034dd5da14 -r 8b9286bffef8 lisp/subr.el --- 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")))