# HG changeset patch # User Kenichi Handa # Date 903144494 0 # Node ID d2ceee5cd572f8ac217f267f404328cbdce2d0da # Parent 0105e2a62bcf822a30c830e1c04700ba44234667 (set-selection-coding-system): Make it interactive. (last-next-selection-coding-system): New variable. (set-next-selection-coding-system): New function. diff -r 0105e2a62bcf -r d2ceee5cd572 lisp/international/mule.el --- a/lisp/international/mule.el Sat Aug 15 01:28:14 1998 +0000 +++ b/lisp/international/mule.el Sat Aug 15 01:28:14 1998 +0000 @@ -759,9 +759,31 @@ "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."