]> code.delx.au - gnu-emacs/blobdiff - lisp/international/mule.el
Merged from miles@gnu.org--gnu-2005 (patch 469)
[gnu-emacs] / lisp / international / mule.el
index cf5c2c75a6a39e96d1d9941bc42c0d5cb616aab7..198ebaa4ef7d0df4b674938bede69512afd73b0f 100644 (file)
@@ -1198,13 +1198,17 @@ see) to CODING-SYSTEM."
 This is normally set according to the selected language environment.
 See also the command `set-terminal-coding-system'.")
 
-(defun set-terminal-coding-system (coding-system)
-  "Set coding system of your terminal to CODING-SYSTEM.
-All text output to the terminal will be encoded
+(defun set-terminal-coding-system (coding-system &optional display)
+  "Set coding system of terminal output to CODING-SYSTEM.
+All text output to DISPLAY will be encoded
 with the specified coding system.
+
 For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems].
 The default is determined by the selected language environment
-or by the previous use of this command."
+or by the previous use of this command.
+
+DISPLAY may be a display id, a frame, or nil for the selected frame's display.
+The setting has no effect on graphical displays."
   (interactive
    (list (let ((default (if (and (not (terminal-coding-system))
                                 default-terminal-coding-system)
@@ -1218,7 +1222,7 @@ or by the previous use of this command."
       (setq coding-system default-terminal-coding-system))
   (if coding-system
       (setq default-terminal-coding-system coding-system))
-  (set-terminal-coding-system-internal coding-system)
+  (set-terminal-coding-system-internal coding-system display)
   (redraw-frame (selected-frame)))
 
 (defvar default-keyboard-coding-system nil
@@ -1226,14 +1230,17 @@ or by the previous use of this command."
 This is normally set according to the selected language environment.
 See also the command `set-keyboard-coding-system'.")
 
-(defun set-keyboard-coding-system (coding-system)
-  "Set coding system for keyboard input to CODING-SYSTEM.
-In addition, this command enables Encoded-kbd minor mode.
-\(If CODING-SYSTEM is nil, Encoded-kbd mode is turned off -- see
-`encoded-kbd-mode'.)
+(defun set-keyboard-coding-system (coding-system &optional display)
+  "Set coding system for keyboard input on DISPLAY to CODING-SYSTEM.
+In addition, this command calls `encoded-kbd-setup-display' to set up the
+translation of keyboard input events to the specified coding system.
+
 For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems].
 The default is determined by the selected language environment
-or by the previous use of this command."
+or by the previous use of this command.
+
+DISPLAY may be a display id, a frame, or nil for the selected frame's display.
+The setting has no effect on graphical displays."
   (interactive
    (list (let ((default (if (and (not (keyboard-coding-system))
                                 default-keyboard-coding-system)
@@ -1247,9 +1254,9 @@ or by the previous use of this command."
       (setq coding-system default-keyboard-coding-system))
   (if coding-system
       (setq default-keyboard-coding-system coding-system))
-  (set-keyboard-coding-system-internal coding-system)
+  (set-keyboard-coding-system-internal coding-system display)
   (setq keyboard-coding-system coding-system)
-  (encoded-kbd-mode (if coding-system 1 0)))
+  (encoded-kbd-setup-display display))
 
 (defcustom keyboard-coding-system nil
   "Specify coding system for keyboard input.
@@ -1265,8 +1272,8 @@ use either \\[customize] or \\[set-keyboard-coding-system]."
   :link '(info-link "(emacs)Specify Coding")
   :link '(info-link "(emacs)Single-Byte Character Support")
   :set (lambda (symbol value)
-        ;; Don't load encoded-kbd-mode unnecessarily.
-        (if (or value (boundp 'encoded-kbd-mode))
+        ;; Don't load encoded-kb unnecessarily.
+        (if (or value (boundp 'encoded-kbd-setup-display))
             (set-keyboard-coding-system value)
           (set-default 'keyboard-coding-system nil))) ; must initialize
   :version "22.1"