diff options
| author | Eli Zaretskii | 2009-01-17 19:14:52 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-01-17 19:14:52 +0000 |
| commit | 6b9e769476955b928b0248fef5aaa0e40754e257 (patch) | |
| tree | efa1dc9d1ccedebe30c537fc805bdbb88976a76e /doc | |
| parent | 3f1d322f586073fe6c284885a42d64503a2bc6c1 (diff) | |
| download | emacs-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.texi | 44 |
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 | |||
| 1517 | sequence, to translate certain event sequences into others. | 1517 | sequence, 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 |
| 1519 | being read, as it is read, against @code{input-decode-map}, then | 1519 | being 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 |
| 1523 | This variable holds a keymap that describes the character sequences sent | 1523 | This 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 | |||
| 1549 | deduced from Termcap and Terminfo. @xref{Terminal-Specific}. | 1549 | deduced 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 |
| 1553 | This variable holds a keymap similar to @code{input-decode-map} except | 1553 | This variable holds a keymap similar to @code{input-decode-map} except |
| 1554 | that it describes key sequences which should be translated to | 1554 | that it describes key sequences which should be translated to |
| 1555 | alternative interpretations that are usually preferred. It applies | 1555 | alternative interpretations that are usually preferred. It applies |
| 1556 | after @code{input-decode-map} and before @code{key-translation-map}. | 1556 | after @code{input-decode-map} and before @code{key-translation-map}. |
| 1557 | 1557 | ||
| 1558 | Entries in @code{function-key-map} are ignored if they conflict with | 1558 | Entries in @code{local-function-key-map} are ignored if they conflict |
| 1559 | bindings made in the minor mode, local, or global keymaps. I.e. | 1559 | with bindings made in the minor mode, local, or global keymaps. I.e. |
| 1560 | the remapping only applies if the original key sequence would | 1560 | the remapping only applies if the original key sequence would |
| 1561 | otherwise not have any binding. | 1561 | otherwise not have any binding. |
| 1562 | |||
| 1563 | @code{local-function-key-map} inherits from @code{function-key-map}, | ||
| 1564 | but 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 |
| 1565 | This variable is another keymap used just like @code{input-decode-map} | 1568 | This variable is another keymap used just like @code{input-decode-map} |
| 1566 | to translate input events into other events. It differs from | 1569 | to 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 |
| 1569 | the results of translation by @code{function-key-map}. | 1572 | receives the results of translation by @code{local-function-key-map}. |
| 1570 | 1573 | ||
| 1571 | Just like @code{input-decode-map}, but unlike @code{function-key-map}, | 1574 | Just like @code{input-decode-map}, but unlike |
| 1572 | this keymap is applied regardless of whether the input key-sequence | 1575 | @code{local-function-key-map}, this keymap is applied regardless of |
| 1573 | has a normal binding. Note however that actual key bindings can have | 1576 | whether the input key-sequence has a normal binding. Note however |
| 1574 | an effect on @code{key-translation-map}, even though they are | 1577 | that actual key bindings can have an effect on |
| 1575 | overridden 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 | 1579 | Indeed, actual key bindings override @code{local-function-key-map} and |
| 1577 | @code{key-translation-map} receives. Clearly, it is better to avoid | 1580 | thus may alter the key sequence that @code{key-translation-map} |
| 1578 | this type of situation. | 1581 | receives. Clearly, it is better to avoid this type of situation. |
| 1579 | 1582 | ||
| 1580 | The intent of @code{key-translation-map} is for users to map one | 1583 | The intent of @code{key-translation-map} is for users to map one |
| 1581 | character set to another, including ordinary characters normally bound | 1584 | character 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 |
| 1586 | You can use @code{input-decode-map}, @code{function-key-map}, or | 1589 | You 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 |
| 1588 | more than simple aliases, by using a function, instead of a key | 1591 | function, instead of a key sequence, as the ``translation'' of a key. |
| 1589 | sequence, as the ``translation'' of a key. Then this function is called | 1592 | Then this function is called to compute the translation of that key. |
| 1590 | to compute the translation of that key. | ||
| 1591 | 1593 | ||
| 1592 | The key translation function receives one argument, which is the prompt | 1594 | The key translation function receives one argument, which is the prompt |
| 1593 | that was specified in @code{read-key-sequence}---or @code{nil} if the | 1595 | that 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 | ||