Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
2020:8b034dd5da14 | 2021:8b9286bffef8 |
---|---|
196 inner-def | 196 inner-def |
197 prefix1))))) | 197 prefix1))))) |
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"))) |
204 (list | 214 (list |
205 'let (list (list original '(match-data))) | 215 'let (list (list original '(match-data))) |