]> git.eshelyaron.com Git - emacs.git/commitdiff
(universal-coding-system-argument):
authorRichard M. Stallman <rms@gnu.org>
Fri, 13 Sep 2002 02:15:56 +0000 (02:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 13 Sep 2002 02:15:56 +0000 (02:15 +0000)
Read the coding system inside `interactive' spec, for command-history.

lisp/ChangeLog
lisp/international/mule-cmds.el

index e4a6373aa2dcb18cfcb607379bb75704f5c4b40f..8aaa36f19fb8bed333ac6935fcf61be9d26784cf 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-12  Richard M. Stallman  <rms@gnu.org>
+
+       * international/mule-cmds.el (universal-coding-system-argument):
+       Read the coding system inside `interactive' spec, for command-history.
+
 2002-09-12  Stefan Monnier  <monnier@cs.yale.edu>
 
        * emacs-lisp/find-func.el (find-library-name): Don't forget
index b1bb4f2825f0b6015eb815d37ffe2c3403551c4c..4eaf6184a91faacd8ecd0a5841cccd37537b6bee 100644 (file)
@@ -261,19 +261,19 @@ wrong, use this command again to toggle back to the right mode."
        (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)