diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/international/mule-cmds.el | 13 | ||||
-rw-r--r-- | lisp/international/mule.el | 26 | ||||
-rw-r--r-- | lisp/term/lk201.el | 2 |
3 files changed, 27 insertions, 14 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index a91c12bcaf2..8af768f91cc 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2470,11 +2470,14 @@ See also `locale-charset-language-names', `locale-language-names', ;; Set the `keyboard-coding-system' if appropriate (tty ;; only). At least X and MS Windows can generate ;; multilingual input. - (unless window-system - (let ((kcs (or coding-system - (car (get-language-info language-name - 'coding-system))))) - (if kcs (set-keyboard-coding-system kcs)))) + ;; XXX This was disabled unless `window-system', but that + ;; leads to buggy behaviour when a tty frame is opened + ;; later. Setting the keyboard coding system has no adverse + ;; effect on X, so let's do it anyway. -- Lorentey + (let ((kcs (or coding-system + (car (get-language-info language-name + 'coding-system))))) + (if kcs (set-keyboard-coding-system kcs))) (setq locale-coding-system (car (get-language-info language-name 'coding-priority)))) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 49635652bb2..d86ce458bf4 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1199,13 +1199,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) @@ -1219,7 +1223,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 @@ -1227,14 +1231,18 @@ 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. +(defun set-keyboard-coding-system (coding-system &optional display) + "Set coding system for keyboard input on DISPLAY 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'.) + 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) @@ -1248,7 +1256,7 @@ 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))) diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 1f8d9ca77a3..b207e13b0a5 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -1,6 +1,8 @@ ;; -*- no-byte-compile: t -*- ;; Define function key sequences for DEC terminals. +;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey + ;; Termcap or terminfo should set these. ;; (define-key function-key-map "\e[A" [up]) ;; (define-key function-key-map "\e[B" [down]) |