Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 35504:9545aa93e735
(universal-coding-system-argument):
Handle commands with prefix args.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 24 Jan 2001 13:14:12 +0000 |
parents | 54d36c772e7b |
children | 18667fa78087 |
comparison
equal
deleted
inserted
replaced
35503:dc575312bb6f | 35504:9545aa93e735 |
---|---|
262 (format "Coding system for following command (default, %s): " default) | 262 (format "Coding system for following command (default, %s): " default) |
263 "Coding system for following command: ") | 263 "Coding system for following command: ") |
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 |
273 (defun set-default-coding-systems (coding-system) | 301 (defun set-default-coding-systems (coding-system) |
274 "Set default value of various coding systems to CODING-SYSTEM. | 302 "Set default value of various coding systems to CODING-SYSTEM. |