* symbol `keymap' in a keymap
@ 2023-09-13 12:48 Shynur Xie
2023-09-15 2:24 ` Michael Heerdegen
0 siblings, 1 reply; 2+ messages in thread
From: Shynur Xie @ 2023-09-13 12:48 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
The elisp manual says (23.3 Format of Keymaps):
"""
A symbol whose function definition is a keymap is also a keymap.
"""
and
"""
Several kinds of elements may appear in a keymap, after the
symbol keymap that begins it:
(type . binding) ...
(type item-name . binding) ...
...
"""
It doesn't list _symbol_.
I noticed that the value of `lisp-mode-map' is
(keymap
(menu-bar ...)
...
keymap ; <-
...)
According to the first quote, I thought the 2nd `keymap' is a keymap,
so I tried
(symbol-function 'keymap)
but the result is `nil', which means it's not a keymap.
This section of the manual seems to have omitted something?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: symbol `keymap' in a keymap
2023-09-13 12:48 symbol `keymap' in a keymap Shynur Xie
@ 2023-09-15 2:24 ` Michael Heerdegen
0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2023-09-15 2:24 UTC (permalink / raw)
To: Shynur Xie; +Cc: help-gnu-emacs@gnu.org
Shynur Xie <one.last.kiss@outlook.com> writes:
> I noticed that the value of `lisp-mode-map' is
>
> (keymap
> (menu-bar ...)
> ...
> keymap ; <-
> ...)
>
> According to the first quote, I thought the 2nd `keymap' is a keymap,
> so I tried
>
> (symbol-function 'keymap)
>
> but the result is `nil', which means it's not a keymap.
No, that's the wrong direction to search for an answer.
You see the above when a keymap has a parent keymap - see
(info "(elisp) Inheritance and Keymaps").
Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-15 2:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 12:48 symbol `keymap' in a keymap Shynur Xie
2023-09-15 2:24 ` Michael Heerdegen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.