From: Eli Zaretskii Date: Sun, 22 Aug 2021 08:32:26 +0000 (+0300) Subject: Improve documentation of 'set-keyboard-coding-system' X-Git-Tag: emacs-28.0.90~1367 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=316cc9152faee7577e158f7caf26ce4c9cd5371a;p=emacs.git Improve documentation of 'set-keyboard-coding-system' * doc/lispref/nonascii.texi (Terminal I/O Encoding): * doc/emacs/mule.texi (Terminal Coding): * lisp/international/mule.el (set-keyboard-coding-system): Document that 'set-keyboard-coding-system' has no effect on modern MS-Windows systems. (Bug#15289) --- diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 22b3677b5b0..81aabfb57d5 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1330,6 +1330,12 @@ You can do this by putting @noindent in your init file. +@findex w32-set-console-codepage + Setting @code{keyboard-coding-system} has no effect on MS-Windows, +except on old Windows 9X systems, in which case the encoding must +match the current codepage of the MS-Windows console, which can be +changed by calling @code{w32-set-console-codepage}. + There is a similarity between using a coding system translation for keyboard input, and using an input method: both define sequences of keyboard input that translate into single characters. However, input diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index c22930d624e..0cc2b7ea1ce 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1988,7 +1988,9 @@ for decoding keyboard input from @var{terminal}. If @var{coding-system} is @code{nil}, that means not to decode keyboard input. If @var{terminal} is a frame, it means that frame's terminal; if it is @code{nil}, that means the currently selected frame's -terminal. @xref{Multiple Terminals}. +terminal. @xref{Multiple Terminals}. Note that on modern MS-Windows +systems Emacs always uses Unicode input when decoding keyboard input, +so the encoding set by this command has no effect on Windows. @end deffn @defun terminal-coding-system &optional terminal diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 9cd38afd8be..1a53237f14a 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1380,8 +1380,11 @@ If CODING-SYSTEM is nil or the coding-type of CODING-SYSTEM is `raw-text', the decoding of keyboard input is disabled. TERMINAL may be a terminal object, a frame, or nil for the -selected frame's terminal. The setting has no effect on -graphical terminals." +selected frame's terminal. + +The setting has no effect on graphical terminals. It also +has no effect on MS-Windows text-mode terminals, except on +Windows 9X systems. For Windows 9X, see also `w32-set-console-codepage'." (interactive (list (let* ((coding (keyboard-coding-system nil)) (default (if (eq (coding-system-type coding) 'raw-text)