changeset 34688:8f397d03b992

(set-keyboard-coding-system): Doc fix. (keyboard-coding-system): New option.
author Dave Love <fx@gnu.org>
date Mon, 18 Dec 2000 17:10:08 +0000
parents 48e5a31a2ff0
children e045e0e60223
files lisp/international/mule.el
diffstat 1 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Dec 18 17:09:42 2000 +0000
+++ b/lisp/international/mule.el	Mon Dec 18 17:10:08 2000 +0000
@@ -993,7 +993,8 @@
 (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.)
+\(If CODING-SYSTEM is nil, Encoded-kbd mode is turned off -- see
+`encoded-kbd-mode'.)
 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."
@@ -1013,6 +1014,26 @@
   (set-keyboard-coding-system-internal coding-system)
   (encoded-kbd-mode (if coding-system 1 0)))
 
+(defcustom keyboard-coding-system nil
+  "Specify coding system for keyboard input.
+If you set this on a terminal which can't distinguish Meta keys from
+8-bit characters, you will have to use ESC to type Meta characters.
+See Info node `Specify Coding' and Info node `Single-Byte Character Support'.
+
+Setting this variable directly does not take effect;
+use either M-x customize or \\[set-keyboard-coding-system]."
+  :type '(coding-system :tag "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))
+	     (set-keyboard-coding-system value)
+	   (set-default 'keyboard-coding-system nil))) ; must initialize
+  :version "21.1"
+  :group 'keyboard
+  :group 'mule)
+
 (defun set-buffer-process-coding-system (decoding encoding)
   "Set coding systems for the process associated with the current buffer.
 DECODING is the coding system to be used to decode input from the process,