diff options
| author | Eli Zaretskii | 2023-04-05 11:31:15 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-04-05 11:31:15 +0300 |
| commit | 38cdfcb2128d5a7b2eb174faca0ef1e32f641e85 (patch) | |
| tree | 674f3a4d847dbd1e33357af53f66d55ccfab39b7 | |
| parent | 257090b8728e6457f6d99f8f0bb32d96594d20f4 (diff) | |
| download | emacs-38cdfcb2128d5a7b2eb174faca0ef1e32f641e85.tar.gz emacs-38cdfcb2128d5a7b2eb174faca0ef1e32f641e85.zip | |
; Fix description of new 'keymap-*' functions
* doc/lispref/keymaps.texi (Prefix Keys): Fix example (bug#62673).
(Functions for Key Lookup): Clarify the possible values of KEYMAP
argument of 'keymap-lookup'.
(Active Keymaps): Fix typo in function name; add cross-reference.
| -rw-r--r-- | doc/lispref/keymaps.texi | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index fdab5075b94..6d07ad5be2c 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -768,8 +768,8 @@ prefix definition, and then by those from the global map. | |||
| 768 | In the following example, we make @kbd{C-p} a prefix key in the local | 768 | In the following example, we make @kbd{C-p} a prefix key in the local |
| 769 | keymap, in such a way that @kbd{C-p} is identical to @kbd{C-x}. Then | 769 | keymap, in such a way that @kbd{C-p} is identical to @kbd{C-x}. Then |
| 770 | the binding for @kbd{C-p C-f} is the function @code{find-file}, just | 770 | the binding for @kbd{C-p C-f} is the function @code{find-file}, just |
| 771 | like @kbd{C-x C-f}. The key sequence @kbd{C-p 6} is not found in any | 771 | like @kbd{C-x C-f}. By contrast, the key sequence @kbd{C-p 9} is not |
| 772 | active keymap. | 772 | found in any active keymap. |
| 773 | 773 | ||
| 774 | @example | 774 | @example |
| 775 | @group | 775 | @group |
| @@ -778,15 +778,14 @@ active keymap. | |||
| 778 | @end group | 778 | @end group |
| 779 | @group | 779 | @group |
| 780 | (keymap-local-set "C-p" ctl-x-map) | 780 | (keymap-local-set "C-p" ctl-x-map) |
| 781 | @result{} nil | 781 | @result{} (keymap #^[nil nil keymap @dots{} |
| 782 | @end group | 782 | @end group |
| 783 | @group | 783 | @group |
| 784 | (keymap-binding "C-p C-f") | 784 | (keymap-lookup nil "C-p C-f") |
| 785 | @result{} find-file | 785 | @result{} find-file |
| 786 | @end group | 786 | @end group |
| 787 | |||
| 788 | @group | 787 | @group |
| 789 | (keymap-binding "C-p 6") | 788 | (keymap-lookup nil "C-p 9") |
| 790 | @result{} nil | 789 | @result{} nil |
| 791 | @end group | 790 | @end group |
| 792 | @end example | 791 | @end example |
| @@ -883,7 +882,7 @@ Normally it ignores @code{overriding-local-map} and | |||
| 883 | then it pays attention to them. @var{position} can optionally be either | 882 | then it pays attention to them. @var{position} can optionally be either |
| 884 | an event position as returned by @code{event-start} or a buffer | 883 | an event position as returned by @code{event-start} or a buffer |
| 885 | position, and may change the keymaps as described for | 884 | position, and may change the keymaps as described for |
| 886 | @code{keymap-binding}. | 885 | @code{keymap-lookup} (@pxref{Functions for Key Lookup, keymap-lookup}). |
| 887 | @end defun | 886 | @end defun |
| 888 | 887 | ||
| 889 | @node Searching Keymaps | 888 | @node Searching Keymaps |
| @@ -1308,7 +1307,11 @@ the second example. | |||
| 1308 | @end group | 1307 | @end group |
| 1309 | @end example | 1308 | @end example |
| 1310 | 1309 | ||
| 1311 | The @var{keymap} argument can also be a list of keymaps. | 1310 | The @var{keymap} argument can be @code{nil}, meaning to look up |
| 1311 | @var{key} in the current keymaps (as returned by | ||
| 1312 | @code{current-active-maps}, @pxref{Active Keymaps}); or it can be a | ||
| 1313 | keymap or a list of keymaps, meaning to look up @var{key} only in the | ||
| 1314 | specified keymaps. | ||
| 1312 | 1315 | ||
| 1313 | Unlike @code{read-key-sequence}, this function does not modify the | 1316 | Unlike @code{read-key-sequence}, this function does not modify the |
| 1314 | specified events in ways that discard information (@pxref{Key Sequence | 1317 | specified events in ways that discard information (@pxref{Key Sequence |