[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling universal-argument with overriding-local-map
From: |
xenodasein |
Subject: |
Re: Calling universal-argument with overriding-local-map |
Date: |
Wed, 5 Jan 2022 18:39:46 +0100 (CET) |
https://lists.gnu.org/archive/html/help-gnu-emacs/2022-01/msg00018.html
From: Stefan Monnier
> I have no idea what that means.
> What do you mean by "calling universal-argument"?
It is bound to a key in overriding-local-map, and bound to C-u in
global-map. I call it by pressing either of those keys on keyboard.
What's the term for this? Invoking command?
> What do you mean by "gets the next non-digit command from global-map"?
As universal-argument uses set-transient-map, if next command isn't
bound in universal-argument-map, it is looked up in next active keymap
I assume. What I expected was that the next active keymap to be
overriding-local-map, as per the link I sent in original mail and
"(elisp) Searching Keymaps"
(or (if overriding-terminal-local-map
(FIND-IN overriding-terminal-local-map))
(if overriding-local-map
(FIND-IN overriding-local-map)
(or (FIND-IN (get-char-property (point) 'keymap))
(FIND-IN-ANY emulation-mode-map-alists)
(FIND-IN-ANY minor-mode-overriding-map-alist)
(FIND-IN-ANY minor-mode-map-alist)
(if (get-text-property (point) 'local-map)
(FIND-IN (get-char-property (point) 'local-map))
(FIND-IN (current-local-map)))))
(FIND-IN (current-global-map)))
However, "(elisp) Controlling Active Maps" implies that only one of
o-t-l-m or o-l-m is active at a time, both can't be.
-- Variable: overriding-terminal-local-map
If non-‘nil’, this variable holds a keymap to use instead of
‘overriding-local-map’, the buffer’s local keymap, text property or
overlay keymaps, and all the minor mode keymaps.
This variable is always local to the current terminal and cannot be
buffer-local. *Note Multiple Terminals::. It is used to implement
incremental search mode.
And they seem to behave that way. Should I send this contradiction in
manual as a bug? Has this always been the behavior or when did it
change? I presume it used to be that both could be active, otherwise
the site from the link and manual has always been wrong.