summaryrefslogtreecommitdiff
path: root/doc/lispref/keymaps.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2013-12-27 11:38:26 +0800
committerChong Yidong <cyd@gnu.org>2013-12-27 11:38:26 +0800
commit0f1d29342f29e666bb6abe4073a30b425a63d26c (patch)
treeea14e45e38b0618be18ba70606e5e68c93c3c6af /doc/lispref/keymaps.texi
parent9cab7521b388464b6028dbd27751019ff2afcdba (diff)
downloademacs-0f1d29342f29e666bb6abe4073a30b425a63d26c.tar.gz
More doc updates
* commands.texi (Reading One Event): Mention keyboard coding. * functions.texi (Function Cells): * eval.texi (Function Indirection): Update for the fact that symbol-function no longer signals an error. * keymaps.texi (Translation Keymaps, Translation Keymaps): * nonascii.texi (Terminal I/O Encoding): Copyedits. * data.c (Fsymbol_function): Doc fix.
Diffstat (limited to 'doc/lispref/keymaps.texi')
-rw-r--r--doc/lispref/keymaps.texi56
1 files changed, 28 insertions, 28 deletions
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index c5ffbc964cc..b9d9aa6ec72 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1551,32 +1551,36 @@ specifies a list of keymaps to search in. This argument is ignored if
@node Translation Keymaps
@section Keymaps for Translating Sequences of Events
+@cindex translation keymap
@cindex keymaps for translating events
- This section describes keymaps that are used during reading a key
-sequence, to translate certain event sequences into others.
-@code{read-key-sequence} checks every subsequence of the key sequence
-being read, as it is read, against @code{input-decode-map}, then
-@code{local-function-key-map}, and then against @code{key-translation-map}.
-
-These keymaps have the same structure as other keymaps, but they are used
-differently: they specify translations to make while reading key sequences,
-rather than bindings for key sequences.
-
-If one of these keymaps ``binds'' a key sequence @var{k} to a vector
-@var{v}, then when @var{k} appears as a subsequence @emph{anywhere} in a
-key sequence, it is replaced with the events in @var{v}.
-
-For example, VT100 terminals send @kbd{@key{ESC} O P} when the
-keypad @key{PF1} key is pressed. Therefore, we want Emacs to translate
-that sequence of events into the single event @code{pf1}. We accomplish
-this by ``binding'' @kbd{@key{ESC} O P} to @code{[pf1]} in
-@code{input-decode-map}, when using a VT100.
-
-Thus, typing @kbd{C-c @key{PF1}} sends the character sequence @kbd{C-c
-@key{ESC} O P}; later the function @code{read-key-sequence} translates
-this back into @kbd{C-c @key{PF1}}, which it returns as the vector
-@code{[?\C-c pf1]}.
+ When the @code{read-key-sequence} function reads a key sequence
+(@pxref{Key Sequence Input}), it uses @dfn{translation keymaps} to
+translate certain event sequences into others. The translation
+keymaps are @code{input-decode-map}, @code{local-function-key-map},
+and @code{key-translation-map} (in order of priority).
+
+ Translation keymaps have the same structure as other keymaps, but
+are used differently: they specify translations to make while reading
+key sequences, rather than bindings for complete key sequences. As
+each key sequence is read, it is checked against each translation
+keymap. If one of the translation keymaps ``binds'' @var{k} to a
+vector @var{v}, then whenever @var{k} appears as a sub-sequence
+@emph{anywhere} in a key sequence, that sub-sequence is replaced with
+the events in @var{v}.
+
+ For example, VT100 terminals send @kbd{@key{ESC} O P} when the
+keypad key @key{PF1} is pressed. On such terminals, Emacs must
+translate that sequence of events into a single event @code{pf1}.
+This is done by ``binding'' @kbd{@key{ESC} O P} to @code{[pf1]} in
+@code{input-decode-map}. Thus, when you type @kbd{C-c @key{PF1}} on
+the terminal, the terminal emits the character sequence @kbd{C-c
+@key{ESC} O P}, and @code{read-key-sequence} translates this back into
+@kbd{C-c @key{PF1}} and returns it as the vector @code{[?\C-c pf1]}.
+
+ Translation keymaps take effect only after Emacs has decoded the
+keyboard input (via the input coding system specified by
+@code{keyboard-coding-system}). @xref{Terminal I/O Encoding}.
@defvar input-decode-map
This variable holds a keymap that describes the character sequences sent
@@ -1664,10 +1668,6 @@ to turn the character that follows into a Hyper character:
@end group
@end example
- If you have enabled keyboard character set decoding using
-@code{set-keyboard-coding-system}, decoding is done before the
-translations listed above. @xref{Terminal I/O Encoding}.
-
@subsection Interaction with normal keymaps
The end of a key sequence is detected when that key sequence either is bound