aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2009-01-17 19:14:52 +0000
committerEli Zaretskii2009-01-17 19:14:52 +0000
commit6b9e769476955b928b0248fef5aaa0e40754e257 (patch)
treeefa1dc9d1ccedebe30c537fc805bdbb88976a76e /doc
parent3f1d322f586073fe6c284885a42d64503a2bc6c1 (diff)
downloademacs-6b9e769476955b928b0248fef5aaa0e40754e257.tar.gz
emacs-6b9e769476955b928b0248fef5aaa0e40754e257.zip
(Translation Keymaps): Rename function-key-map to local-function-key-map.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/keymaps.texi44
1 files changed, 23 insertions, 21 deletions
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 06dcd22ecd5..b6a7604450d 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1517,7 +1517,7 @@ specifies a list of keymaps to search in. This argument is ignored if
1517sequence, to translate certain event sequences into others. 1517sequence, to translate certain event sequences into others.
1518@code{read-key-sequence} checks every subsequence of the key sequence 1518@code{read-key-sequence} checks every subsequence of the key sequence
1519being read, as it is read, against @code{input-decode-map}, then 1519being read, as it is read, against @code{input-decode-map}, then
1520@code{function-key-map}, and then against @code{key-translation-map}. 1520@code{local-function-key-map}, and then against @code{key-translation-map}.
1521 1521
1522@defvar input-decode-map 1522@defvar input-decode-map
1523This variable holds a keymap that describes the character sequences sent 1523This variable holds a keymap that describes the character sequences sent
@@ -1549,33 +1549,36 @@ to make entries in @code{input-decode-map} beyond those that can be
1549deduced from Termcap and Terminfo. @xref{Terminal-Specific}. 1549deduced from Termcap and Terminfo. @xref{Terminal-Specific}.
1550@end defvar 1550@end defvar
1551 1551
1552@defvar function-key-map 1552@defvar local-function-key-map
1553This variable holds a keymap similar to @code{input-decode-map} except 1553This variable holds a keymap similar to @code{input-decode-map} except
1554that it describes key sequences which should be translated to 1554that it describes key sequences which should be translated to
1555alternative interpretations that are usually preferred. It applies 1555alternative interpretations that are usually preferred. It applies
1556after @code{input-decode-map} and before @code{key-translation-map}. 1556after @code{input-decode-map} and before @code{key-translation-map}.
1557 1557
1558Entries in @code{function-key-map} are ignored if they conflict with 1558Entries in @code{local-function-key-map} are ignored if they conflict
1559bindings made in the minor mode, local, or global keymaps. I.e. 1559with bindings made in the minor mode, local, or global keymaps. I.e.
1560the remapping only applies if the original key sequence would 1560the remapping only applies if the original key sequence would
1561otherwise not have any binding. 1561otherwise not have any binding.
1562
1563@code{local-function-key-map} inherits from @code{function-key-map},
1564but the latter should not be used directly.
1562@end defvar 1565@end defvar
1563 1566
1564@defvar key-translation-map 1567@defvar key-translation-map
1565This variable is another keymap used just like @code{input-decode-map} 1568This variable is another keymap used just like @code{input-decode-map}
1566to translate input events into other events. It differs from 1569to translate input events into other events. It differs from
1567@code{input-decode-map} in that it goes to work after 1570@code{input-decode-map} in that it goes to work after
1568@code{function-key-map} is finished rather than before; it receives 1571@code{local-function-key-map} is finished rather than before; it
1569the results of translation by @code{function-key-map}. 1572receives the results of translation by @code{local-function-key-map}.
1570 1573
1571Just like @code{input-decode-map}, but unlike @code{function-key-map}, 1574Just like @code{input-decode-map}, but unlike
1572this keymap is applied regardless of whether the input key-sequence 1575@code{local-function-key-map}, this keymap is applied regardless of
1573has a normal binding. Note however that actual key bindings can have 1576whether the input key-sequence has a normal binding. Note however
1574an effect on @code{key-translation-map}, even though they are 1577that actual key bindings can have an effect on
1575overridden by it. Indeed, actual key bindings override 1578@code{key-translation-map}, even though they are overridden by it.
1576@code{function-key-map} and thus may alter the key sequence that 1579Indeed, actual key bindings override @code{local-function-key-map} and
1577@code{key-translation-map} receives. Clearly, it is better to avoid 1580thus may alter the key sequence that @code{key-translation-map}
1578this type of situation. 1581receives. Clearly, it is better to avoid this type of situation.
1579 1582
1580The intent of @code{key-translation-map} is for users to map one 1583The intent of @code{key-translation-map} is for users to map one
1581character set to another, including ordinary characters normally bound 1584character set to another, including ordinary characters normally bound
@@ -1583,11 +1586,10 @@ to @code{self-insert-command}.
1583@end defvar 1586@end defvar
1584 1587
1585@cindex key translation function 1588@cindex key translation function
1586You can use @code{input-decode-map}, @code{function-key-map}, or 1589You can use @code{input-decode-map}, @code{local-function-key-map}, or
1587@code{key-translation-map} for 1590@code{key-translation-map} for more than simple aliases, by using a
1588more than simple aliases, by using a function, instead of a key 1591function, instead of a key sequence, as the ``translation'' of a key.
1589sequence, as the ``translation'' of a key. Then this function is called 1592Then this function is called to compute the translation of that key.
1590to compute the translation of that key.
1591 1593
1592The key translation function receives one argument, which is the prompt 1594The key translation function receives one argument, which is the prompt
1593that was specified in @code{read-key-sequence}---or @code{nil} if the 1595that was specified in @code{read-key-sequence}---or @code{nil} if the
@@ -1618,7 +1620,7 @@ to turn the character that follows into a Hyper character:
1618 symbol 1620 symbol
1619 (cons symbol (cdr e))))) 1621 (cons symbol (cdr e)))))
1620 1622
1621(define-key function-key-map "\C-ch" 'hyperify) 1623(define-key local-function-key-map "\C-ch" 'hyperify)
1622@end group 1624@end group
1623@end example 1625@end example
1624 1626