Commit 9ec7751f authored by Chong Yidong's avatar Chong Yidong

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).
parent d55486c7
2012-04-23 Chong Yidong <cyd@gnu.org>
* keymaps.texi (Scanning Keymaps): Fix description of NO-REMAP arg
to where-is-internal (Bug#10872).
2012-04-21 Glenn Morris <rgm@gnu.org>
* macros.texi (Indenting Macros): Fix typo.
......
......@@ -1904,12 +1904,19 @@ If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't
follow indirect keymap bindings. This makes it possible to search for
an indirect definition itself.
When command remapping is in effect (@pxref{Remapping Commands}),
@code{where-is-internal} figures out when a command will be run due to
remapping and reports keys accordingly. It also returns @code{nil} if
@var{command} won't really be run because it has been remapped to some
other command. However, if @var{no-remap} is non-@code{nil}.
@code{where-is-internal} ignores remappings.
If another command @var{other-command} is remapped to @var{command}
(@pxref{Remapping Commands}), this function searches for the bindings
of @var{other-command} and treats them as though they are also
bindings for @var{command}. But if the @var{no-remap} argument is
non-@code{nil}, this function instead includes the vector @code{[remap
@var{other-command}]} in the list of possible key sequences, without
searching for the bindings of @var{other-command}.
On the other hand, if @var{command} is remapped to another command,
this function still returns the original bindings of @var{command},
even though those keys would actually invoke the other command. To
determine the remapping status of @var{command}, use the function
@code{command-remapping} (@pxref{Remapping Commands}).
@smallexample
@group
......
2012-04-23 Chong Yidong <cyd@gnu.org>
* keymap.c (where_is_internal): Doc fix (Bug#10872).
2012-04-20 Glenn Morris <rgm@gnu.org>
* fileio.c (Fcopy_file, Fset_file_selinux_context):
......
......@@ -2553,7 +2553,8 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
doc: /* Return list of keys that invoke DEFINITION.
If KEYMAP is a keymap, search only KEYMAP and the global keymap.
If KEYMAP is nil, search all the currently active keymaps.
If KEYMAP is nil, search all the currently active keymaps, except
for `overriding-local-map' (which is ignored).
If KEYMAP is a list of keymaps, search only those keymaps.
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
to other keymaps or slots. This makes it possible to search for an
indirect definition itself.
If optional 5th arg NO-REMAP is non-nil, don't search for key sequences
that invoke a command which is remapped to DEFINITION, but include the
remapped command in the returned list. */)
If another command OTHER-COMMAND is remapped to DEFINITION, search for
the bindings of OTHER-COMMAND and include them in the returned list.
But if optional 5th arg NO-REMAP is non-nil, just include the vector
[remap OTHER-COMMAND] in the returned list, without searching for
those other bindings.
If DEFINITION is remapped to another command, this function still
returns its bindings, even though those key sequences actually invoke
the other command. Use `command-remapping' to find the remapping
status of DEFINITION. */)
(Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap)
{
/* The keymaps in which to search. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment