Subject: RE: bug#30958: 26.0.91; No documentation for key and value in the function passed to `map-keymap'

From: Drew Adams <[email-masked]>
Date: Mon, 26 Mar 2018 21:15:38 -0700 (PDT)

> A callback function should be passed to `map-keymap'. However,
> the description of the callback function seems to be missing
> (undocumented). For example, the value does not seems to always be a
> function. It is sometimes an alist, sometimes a more complicated list.
> 
> I think this might have never been documented. If it is documented, it
> would be greatly appreciated if a pointer to the actual documentation
> can be added to the document of `map-keymap'.

(If this report is clear to others then don't worry about it,
but it's not clear to me.)

I wouldn't call the FUNCTION arg a "callback" function, but
it's the only function that is passed, AFAIK, so I guess
that's the one you mean.

What makes you think it doesn't always need to be a function?
Grepping the Emacs Lisp files, I don't see any cases where it
is not a function (or where the KEYMAP arg is a function).

FUNCTION is described pretty well in the doc, I think - the
args it is passed are described.

If you instead meant the KEYMAP arg (whose value is not a
function, AFAIK), then there is a whole section of the Elisp
manual devoted do describing that, including the various
forms a keymap can take (e.g. particular kinds of alists).

See https://www.gnu.org/software/emacs/manual/html_node/elisp/Keymaps.html
and its child nodes.

(I'm probably missing something that you meant.  If so,
please ignore.)