diff options
| author | Chong Yidong | 2012-04-23 11:11:28 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-23 11:11:28 +0800 |
| commit | 9ec7751f83254ee3bc13030b7933d1b454c33cd5 (patch) | |
| tree | 59c317ef2fadc671bf2c9aa87232f148a46f7f5c | |
| parent | d55486c7f89d12ab799c7bf631b86fb0ccf52e52 (diff) | |
| download | emacs-9ec7751f83254ee3bc13030b7933d1b454c33cd5.tar.gz emacs-9ec7751f83254ee3bc13030b7933d1b454c33cd5.zip | |
Doc fixes for where-is-internal.
* doc/lispref/keymaps.texi (Scanning Keymaps): Fix description of
NO-REMAP arg to where-is-internal.
* src/keymap.c (where_is_internal): Doc fix (Bug#10872).
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 19 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/keymap.c | 16 |
4 files changed, 34 insertions, 10 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fa2b3386d19..1dbc35d46de 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * keymaps.texi (Scanning Keymaps): Fix description of NO-REMAP arg | ||
| 4 | to where-is-internal (Bug#10872). | ||
| 5 | |||
| 1 | 2012-04-21 Glenn Morris <rgm@gnu.org> | 6 | 2012-04-21 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * macros.texi (Indenting Macros): Fix typo. | 8 | * macros.texi (Indenting Macros): Fix typo. |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index f1d4690d470..f67174b6a52 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -1904,12 +1904,19 @@ If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't | |||
| 1904 | follow indirect keymap bindings. This makes it possible to search for | 1904 | follow indirect keymap bindings. This makes it possible to search for |
| 1905 | an indirect definition itself. | 1905 | an indirect definition itself. |
| 1906 | 1906 | ||
| 1907 | When command remapping is in effect (@pxref{Remapping Commands}), | 1907 | If another command @var{other-command} is remapped to @var{command} |
| 1908 | @code{where-is-internal} figures out when a command will be run due to | 1908 | (@pxref{Remapping Commands}), this function searches for the bindings |
| 1909 | remapping and reports keys accordingly. It also returns @code{nil} if | 1909 | of @var{other-command} and treats them as though they are also |
| 1910 | @var{command} won't really be run because it has been remapped to some | 1910 | bindings for @var{command}. But if the @var{no-remap} argument is |
| 1911 | other command. However, if @var{no-remap} is non-@code{nil}. | 1911 | non-@code{nil}, this function instead includes the vector @code{[remap |
| 1912 | @code{where-is-internal} ignores remappings. | 1912 | @var{other-command}]} in the list of possible key sequences, without |
| 1913 | searching for the bindings of @var{other-command}. | ||
| 1914 | |||
| 1915 | On the other hand, if @var{command} is remapped to another command, | ||
| 1916 | this function still returns the original bindings of @var{command}, | ||
| 1917 | even though those keys would actually invoke the other command. To | ||
| 1918 | determine the remapping status of @var{command}, use the function | ||
| 1919 | @code{command-remapping} (@pxref{Remapping Commands}). | ||
| 1913 | 1920 | ||
| 1914 | @smallexample | 1921 | @smallexample |
| 1915 | @group | 1922 | @group |
diff --git a/src/ChangeLog b/src/ChangeLog index 2d5520c9dbb..faa2a104337 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-04-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * keymap.c (where_is_internal): Doc fix (Bug#10872). | ||
| 4 | |||
| 1 | 2012-04-20 Glenn Morris <rgm@gnu.org> | 5 | 2012-04-20 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * fileio.c (Fcopy_file, Fset_file_selinux_context): | 7 | * fileio.c (Fcopy_file, Fset_file_selinux_context): |
diff --git a/src/keymap.c b/src/keymap.c index ecaeb32896e..3528a61d6ea 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2553,7 +2553,8 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps, | |||
| 2553 | DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, | 2553 | DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, |
| 2554 | doc: /* Return list of keys that invoke DEFINITION. | 2554 | doc: /* Return list of keys that invoke DEFINITION. |
| 2555 | If KEYMAP is a keymap, search only KEYMAP and the global keymap. | 2555 | If KEYMAP is a keymap, search only KEYMAP and the global keymap. |
| 2556 | If KEYMAP is nil, search all the currently active keymaps. | 2556 | If KEYMAP is nil, search all the currently active keymaps, except |
| 2557 | for `overriding-local-map' (which is ignored). | ||
| 2557 | If KEYMAP is a list of keymaps, search only those keymaps. | 2558 | If KEYMAP is a list of keymaps, search only those keymaps. |
| 2558 | 2559 | ||
| 2559 | If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found, | 2560 | If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found, |
| @@ -2568,9 +2569,16 @@ If optional 4th arg NOINDIRECT is non-nil, don't follow indirections | |||
| 2568 | to other keymaps or slots. This makes it possible to search for an | 2569 | to other keymaps or slots. This makes it possible to search for an |
| 2569 | indirect definition itself. | 2570 | indirect definition itself. |
| 2570 | 2571 | ||
| 2571 | If optional 5th arg NO-REMAP is non-nil, don't search for key sequences | 2572 | If another command OTHER-COMMAND is remapped to DEFINITION, search for |
| 2572 | that invoke a command which is remapped to DEFINITION, but include the | 2573 | the bindings of OTHER-COMMAND and include them in the returned list. |
| 2573 | remapped command in the returned list. */) | 2574 | But if optional 5th arg NO-REMAP is non-nil, just include the vector |
| 2575 | [remap OTHER-COMMAND] in the returned list, without searching for | ||
| 2576 | those other bindings. | ||
| 2577 | |||
| 2578 | If DEFINITION is remapped to another command, this function still | ||
| 2579 | returns its bindings, even though those key sequences actually invoke | ||
| 2580 | the other command. Use `command-remapping' to find the remapping | ||
| 2581 | status of DEFINITION. */) | ||
| 2574 | (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) | 2582 | (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) |
| 2575 | { | 2583 | { |
| 2576 | /* The keymaps in which to search. */ | 2584 | /* The keymaps in which to search. */ |