From: Lars Ingebrigtsen Date: Thu, 25 Jul 2019 09:52:59 +0000 (+0200) Subject: Clarify in the manual when to use function-key-map X-Git-Tag: emacs-27.0.90~1817^2~134 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a112547f91d8b4131ed01a05f15f22aa18b85a49;p=emacs.git Clarify in the manual when to use function-key-map * doc/misc/efaq.texi (No Escape key): * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): Change back to function-key-map from local-function-key-map, because these bindings apply to all terminals. * doc/lispref/keymaps.texi (Translation Keymaps): Clarify in what circumstances you may still want to use function-key-map. --- diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index 32cdcd4f9db..e0d3bcd4093 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -105,7 +105,7 @@ following line into your @file{_emacs} file: @smallexample ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} -(define-key local-function-key-map [kp-enter] [?\C-j]) +(define-key function-key-map [kp-enter] [?\C-j]) @end smallexample @node MS-DOS Mouse diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 6ad665a9502..b8eed0a501c 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -1614,8 +1614,9 @@ with bindings made in the minor mode, local, or global keymaps. I.e., the remapping only applies if the original key sequence would otherwise not have any binding. -@code{local-function-key-map} inherits from @code{function-key-map}, -but the latter should not be used directly. +@code{local-function-key-map} inherits from @code{function-key-map}. +The latter should only be altered if you want the binding to apply in +all terminals, so using the former is almost always preferred. @end defvar @defvar key-translation-map diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index fcc8e9f11ed..8fd3bf3a45e 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -3890,7 +3890,7 @@ The only way to affect the behavior of keys within Emacs is through @code{local-function-key-map} map. For instance, @lisp -(define-key local-function-key-map [M-@key{TAB}] [?\M-\t]) +(define-key function-key-map [M-@key{TAB}] [?\M-\t]) @end lisp @noindent @@ -4099,7 +4099,7 @@ generates @key{ESC}. If not, the following form can be used to bind it: @lisp ;; F11 is the documented ESC replacement on DEC terminals. -(define-key local-function-key-map [f11] [?\e]) +(define-key function-key-map [f11] [?\e]) @end lisp @node Compose Character