diff options
| author | Gerd Moellmann | 2001-01-24 13:14:45 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-24 13:14:45 +0000 |
| commit | 043631796e44bcfde79160170c96142c10175b0d (patch) | |
| tree | 952a1ed4bb5e41d30f437b64691733bd2042271c | |
| parent | daae70def35f936b560acfb382555339bb98259b (diff) | |
| download | emacs-043631796e44bcfde79160170c96142c10175b0d.tar.gz emacs-043631796e44bcfde79160170c96142c10175b0d.zip | |
(universal-coding-system-argument):
Handle commands with prefix args.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 32 |
2 files changed, 35 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bac8e169de2..3fa3c14a06c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-01-24 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * international/mule-cmds.el (universal-coding-system-argument): | ||
| 4 | Handle commands with prefix args. | ||
| 5 | |||
| 1 | 2001-01-24 Edward M. Reingold <reingold@emr.cs.uiuc.edu> | 6 | 2001-01-24 Edward M. Reingold <reingold@emr.cs.uiuc.edu> |
| 2 | 7 | ||
| 3 | * calendar/diary-lib.el (diary-float): Fix case of MONTH | 8 | * calendar/diary-lib.el (diary-float): Fix case of MONTH |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 6ff2e46b53a..0d81e8412fb 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -264,9 +264,37 @@ wrong, use this command again to toggle back to the right mode." | |||
| 264 | default)) | 264 | default)) |
| 265 | (keyseq (read-key-sequence | 265 | (keyseq (read-key-sequence |
| 266 | (format "Command to execute with %s:" coding-system))) | 266 | (format "Command to execute with %s:" coding-system))) |
| 267 | (cmd (key-binding keyseq))) | 267 | (cmd (key-binding keyseq)) |
| 268 | prefix) | ||
| 269 | |||
| 270 | (when (eq cmd 'universal-argument) | ||
| 271 | (call-interactively cmd) | ||
| 272 | |||
| 273 | ;; Process keys bound in `universal-argument-map'. | ||
| 274 | (while (progn | ||
| 275 | (setq keyseq (read-key-sequence nil t) | ||
| 276 | cmd (key-binding keyseq t)) | ||
| 277 | (not (eq cmd 'universal-argument-other-key))) | ||
| 278 | (let ((current-prefix-arg prefix-arg) | ||
| 279 | ;; Have to bind `last-command-char' here so that | ||
| 280 | ;; `digit-argument', for isntance, can compute the | ||
| 281 | ;; prefix arg. | ||
| 282 | (last-command-char (aref keyseq 0))) | ||
| 283 | (call-interactively cmd))) | ||
| 284 | |||
| 285 | ;; This is the final call to `univeral-argument-other-key', which | ||
| 286 | ;; set's the final `prefix-arg. | ||
| 287 | (let ((current-prefix-arg prefix-arg)) | ||
| 288 | (call-interactively cmd)) | ||
| 289 | |||
| 290 | ;; Read the command to execute with the given prefix arg. | ||
| 291 | (setq prefix prefix-arg | ||
| 292 | keyseq (read-key-sequence nil t) | ||
| 293 | cmd (key-binding keyseq))) | ||
| 294 | |||
| 268 | (let ((coding-system-for-read coding-system) | 295 | (let ((coding-system-for-read coding-system) |
| 269 | (coding-system-for-write coding-system)) | 296 | (coding-system-for-write coding-system) |
| 297 | (current-prefix-arg prefix)) | ||
| 270 | (message "") | 298 | (message "") |
| 271 | (call-interactively cmd)))) | 299 | (call-interactively cmd)))) |
| 272 | 300 | ||