diff options
| author | Stefan Monnier | 2008-05-21 02:32:31 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-05-21 02:32:31 +0000 |
| commit | 59f3685985af13a64a7e390c13962f2b074c36eb (patch) | |
| tree | 56c867d7178953957065df95f34f4692d7c46773 | |
| parent | 5c2a72d900a7b0615149c1f775144aea41f9e159 (diff) | |
| download | emacs-59f3685985af13a64a7e390c13962f2b074c36eb.tar.gz emacs-59f3685985af13a64a7e390c13962f2b074c36eb.zip | |
(insert-kbd-macro): Use prin1-char.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/macros.el | 38 |
2 files changed, 7 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 562877e2527..ea8bc7296c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-05-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * macros.el (insert-kbd-macro): Use prin1-char. | ||
| 4 | |||
| 1 | 2008-05-20 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2008-05-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * minibuffer.el (completion-boundaries): New function. | 7 | * minibuffer.el (completion-boundaries): New function. |
diff --git a/lisp/macros.el b/lisp/macros.el index 4f0194ea595..f8d0b5af92e 100644 --- a/lisp/macros.el +++ b/lisp/macros.el | |||
| @@ -131,41 +131,9 @@ use this command, and then save the file." | |||
| 131 | (insert (if (zerop i) ?\[ ?\s)) | 131 | (insert (if (zerop i) ?\[ ?\s)) |
| 132 | (setq char (aref definition i) | 132 | (setq char (aref definition i) |
| 133 | i (1+ i)) | 133 | i (1+ i)) |
| 134 | (cond ((not (numberp char)) | 134 | (if (not (numberp char)) |
| 135 | (prin1 char (current-buffer))) | 135 | (prin1 char (current-buffer)) |
| 136 | (t | 136 | (princ (prin1-char char) (current-buffer)))) |
| 137 | (insert "?") | ||
| 138 | (setq mods (event-modifiers char) | ||
| 139 | char (event-basic-type char)) | ||
| 140 | (while mods | ||
| 141 | (cond ((eq (car mods) 'control) | ||
| 142 | (insert "\\C-")) | ||
| 143 | ((eq (car mods) 'meta) | ||
| 144 | (insert "\\M-")) | ||
| 145 | ((eq (car mods) 'hyper) | ||
| 146 | (insert "\\H-")) | ||
| 147 | ((eq (car mods) 'super) | ||
| 148 | (insert "\\s-")) | ||
| 149 | ((eq (car mods) 'alt) | ||
| 150 | (insert "\\A-")) | ||
| 151 | ((and (eq (car mods) 'shift) | ||
| 152 | (>= char ?a) | ||
| 153 | (<= char ?z)) | ||
| 154 | (setq char (upcase char))) | ||
| 155 | ((eq (car mods) 'shift) | ||
| 156 | (insert "\\S-"))) | ||
| 157 | (setq mods (cdr mods))) | ||
| 158 | (cond ((= char ?\\) | ||
| 159 | (insert "\\\\")) | ||
| 160 | ((= char ?\") | ||
| 161 | (insert "\\\"")) | ||
| 162 | ((= char ?\;) | ||
| 163 | (insert "\\;")) | ||
| 164 | ((= char 127) | ||
| 165 | (insert "\\C-?")) | ||
| 166 | ((< char 127) | ||
| 167 | (insert char)) | ||
| 168 | (t (insert "\\" (format "%o" char))))))) | ||
| 169 | (insert ?\])) | 137 | (insert ?\])) |
| 170 | (prin1 definition (current-buffer)))) | 138 | (prin1 definition (current-buffer)))) |
| 171 | (insert ")\n") | 139 | (insert ")\n") |