diff options
author | Kenichi Handa <handa@m17n.org> | 2004-04-16 12:51:06 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2004-04-16 12:51:06 +0000 |
commit | 6b61353c0a0320ee15bb6488149735381fed62ec (patch) | |
tree | e69adba60e504a5a37beb556ad70084de88a7aab /lisp/edmacro.el | |
parent | dc6a28319312fe81f7a1015e363174022313f0bd (diff) | |
download | emacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.gz emacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.bz2 emacs-6b61353c0a0320ee15bb6488149735381fed62ec.zip |
Sync to HEAD
Diffstat (limited to 'lisp/edmacro.el')
-rw-r--r-- | lisp/edmacro.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 68e9f40a10f..072b52fc8fd 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -418,7 +418,7 @@ doubt, use whitespace." (while (memq (aref rest-mac i) (cdr mdigs)) (incf i)) (and (not (memq (aref rest-mac i) pkeys)) - (prog1 (concat "M-" (edmacro-subseq rest-mac 0 i) " ") + (prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 i) " ") (callf edmacro-subseq rest-mac i))))) (and (eq (aref rest-mac 0) ?\C-u) (eq (key-binding [?\C-u]) 'universal-argument) @@ -437,7 +437,7 @@ doubt, use whitespace." '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) (incf i)) (and (not (memq (aref rest-mac i) pkeys)) - (prog1 (concat "C-u " (edmacro-subseq rest-mac 1 i) " ") + (prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 i) " ") (callf edmacro-subseq rest-mac i))))))) (bind-len (apply 'max 1 (loop for map in maps @@ -525,7 +525,8 @@ doubt, use whitespace." (t (error "Unrecognized item in macro: %s" ch))))) (or fkey key) " ")))) - (if prefix (setq desc (concat prefix desc))) + (if prefix + (setq desc (concat (edmacro-sanitize-for-string prefix) desc))) (unless (string-match " " desc) (let ((times 1) (pos bind-len)) (while (not (edmacro-mismatch rest-mac rest-mac @@ -608,6 +609,16 @@ If START or END is negative, it counts from the end." (setq i (1+ i) start (1+ start))) res)))))) +(defun edmacro-sanitize-for-string (seq) + "Convert a key sequence vector into a string. +The string represents the same events; Meta is indicated by bit 7. +This function assumes that the events can be stored in a string." + (setq seq (copy-sequence seq)) + (loop for i below (length seq) do + (when (< (aref seq i) 0) + (setf (aref seq i) (logand (aref seq i) 127)))) + seq) + (defun edmacro-fix-menu-commands (macro &optional noerror) (if (vectorp macro) (let (result) @@ -727,4 +738,5 @@ If START or END is negative, it counts from the end." (provide 'edmacro) +;;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7 ;;; edmacro.el ends here |