# HG changeset patch # User Richard M. Stallman # Date 1031883341 0 # Node ID 6bd30e0772572357e49192135d76b7a493e59c4f # Parent e7a743caaf4b6e361331f896cc019c56a5f23de9 (universal-coding-system-argument): Read the coding system inside `interactive' spec, for command-history. diff -r e7a743caaf4b -r 6bd30e077257 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Thu Sep 12 22:03:55 2002 +0000 +++ b/lisp/international/mule-cmds.el Fri Sep 13 02:15:41 2002 +0000 @@ -261,19 +261,19 @@ (coding-system-for-read 'iso-2022-7bit)) (find-file-read-only (expand-file-name "HELLO" data-directory)))) -(defun universal-coding-system-argument () +(defun universal-coding-system-argument (coding-system) "Execute an I/O command using the specified coding system." - (interactive) - (let* ((default (and buffer-file-coding-system + (interactive + (let ((default (and buffer-file-coding-system (not (eq (coding-system-type buffer-file-coding-system) t)) - buffer-file-coding-system)) - (coding-system (read-coding-system - (if default - (format "Coding system for following command (default, %s): " default) - "Coding system for following command: ") - default)) - (keyseq (read-key-sequence + buffer-file-coding-system))) + (list (read-coding-system + (if default + (format "Coding system for following command (default, %s): " default) + "Coding system for following command: ") + default)))) + (let* ((keyseq (read-key-sequence (format "Command to execute with %s:" coding-system))) (cmd (key-binding keyseq)) prefix)