# HG changeset patch # User Gerd Moellmann # Date 980342052 0 # Node ID 9545aa93e73582b9c1c1e473486f262867cfd052 # Parent dc575312bb6fa7afa1732c4c706adbe8fe72579d (universal-coding-system-argument): Handle commands with prefix args. diff -r dc575312bb6f -r 9545aa93e735 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Wed Jan 24 12:31:07 2001 +0000 +++ b/lisp/international/mule-cmds.el Wed Jan 24 13:14:12 2001 +0000 @@ -264,9 +264,37 @@ default)) (keyseq (read-key-sequence (format "Command to execute with %s:" coding-system))) - (cmd (key-binding keyseq))) + (cmd (key-binding keyseq)) + prefix) + + (when (eq cmd 'universal-argument) + (call-interactively cmd) + + ;; Process keys bound in `universal-argument-map'. + (while (progn + (setq keyseq (read-key-sequence nil t) + cmd (key-binding keyseq t)) + (not (eq cmd 'universal-argument-other-key))) + (let ((current-prefix-arg prefix-arg) + ;; Have to bind `last-command-char' here so that + ;; `digit-argument', for isntance, can compute the + ;; prefix arg. + (last-command-char (aref keyseq 0))) + (call-interactively cmd))) + + ;; This is the final call to `univeral-argument-other-key', which + ;; set's the final `prefix-arg. + (let ((current-prefix-arg prefix-arg)) + (call-interactively cmd)) + + ;; Read the command to execute with the given prefix arg. + (setq prefix prefix-arg + keyseq (read-key-sequence nil t) + cmd (key-binding keyseq))) + (let ((coding-system-for-read coding-system) - (coding-system-for-write coding-system)) + (coding-system-for-write coding-system) + (current-prefix-arg prefix)) (message "") (call-interactively cmd))))