summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-08-15 01:28:14 +0000
committerKenichi Handa <handa@m17n.org>1998-08-15 01:28:14 +0000
commite78dcd3bbdf81682e0c9b9679ee73de607b9fc22 (patch)
tree20d4d91cbd37dd78b76ab414d6258e5f5bbd9b0c
parent263b53b675c9853b498675bd979004617de95383 (diff)
downloademacs-e78dcd3bbdf81682e0c9b9679ee73de607b9fc22.tar.gz
(set-selection-coding-system): Make it
interactive. (last-next-selection-coding-system): New variable. (set-next-selection-coding-system): New function.
-rw-r--r--lisp/international/mule.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index d6ea0b46197..7544bf5b234 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -759,9 +759,31 @@ For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]."
"Make CODING-SYSTEM used for communicating with other X clients .
When sending or receiving text via cut_buffer, selection, and clipboard,
the text is encoded or decoded by CODING-SYSTEM."
+ (interactive "zCoding system for X selection: ")
(check-coding-system coding-system)
(setq selection-coding-system coding-system))
+;; Coding system lastly specfied by the command
+;; set-next-selection-coding-system.
+(defvar last-next-selection-coding-system nil)
+
+(defun set-next-selection-coding-system (coding-system)
+ "Make CODING-SYSTEM used for the next communication with other X clients.
+This setting is effective for the next communication only."
+ (interactive
+ (list (read-coding-system
+ (if last-next-selection-coding-system
+ (format "Coding system for the next X selection (default, %S): "
+ last-next-selection-coding-system)
+ "Coding system for the next X selection: ")
+ last-next-selection-coding-system)))
+ (if coding-system
+ (setq last-next-selection-coding-system coding-system)
+ (setq coding-system last-next-selection-coding-system))
+ (check-coding-system coding-system)
+
+ (setq next-selection-coding-system coding-system))
+
(defun set-coding-priority (arg)
"Set priority of coding categories according to LIST.
LIST is a list of coding categories ordered by priority."