summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-09-13 02:15:56 +0000
committerRichard M. Stallman <rms@gnu.org>2002-09-13 02:15:56 +0000
commit9e9a77a62abe781d5c88013ad88116267b59943d (patch)
tree3d8a25ab7d6123600bc42fb16943385ca071a63b /lisp
parent23fdddf7d123a7abf149e3ca839cd69de14ad876 (diff)
downloademacs-9e9a77a62abe781d5c88013ad88116267b59943d.tar.gz
emacs-9e9a77a62abe781d5c88013ad88116267b59943d.tar.bz2
emacs-9e9a77a62abe781d5c88013ad88116267b59943d.zip
(universal-coding-system-argument):
Read the coding system inside `interactive' spec, for command-history.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/international/mule-cmds.el20
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e4a6373aa2d..8aaa36f19fb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index b1bb4f2825f..4eaf6184a91 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -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)