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
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,
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. */