* Calling universal-argument with overriding-local-map
@ 2022-01-05 12:06 xenodasein--- via Users list for the GNU Emacs text editor
2022-01-05 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: xenodasein--- via Users list for the GNU Emacs text editor @ 2022-01-05 12:06 UTC (permalink / raw)
To: help-gnu-emacs
Calling universal-argument when overriding-local-map is active,
either from a binding in it or global C-u, gets the next non-digit
command from global-map. Shouldn't it be getting it from o-l-m?
https://doc.endlessparentheses.com/Var/overriding-local-map
Is this a buffer local variable issue? I set o-l-m from a command
using setq.
Using master:
f5f5297a9254bb2da751da184eaf03a919a1766a
Date: Thu Dec 2 19:31:43 2021 +0100
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calling universal-argument with overriding-local-map
2022-01-05 12:06 xenodasein--- via Users list for the GNU Emacs text editor
@ 2022-01-05 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-01-05 16:48 UTC (permalink / raw)
To: help-gnu-emacs
xenodasein--- via Users list for the GNU Emacs text editor [2022-01-05 13:06:17] wrote:
> Calling universal-argument when overriding-local-map is active,
> either from a binding in it or global C-u, gets the next non-digit
> command from global-map. Shouldn't it be getting it from o-l-m?
I have no idea what that means.
What do you mean by "calling universal-argument"?
What do you mean by "gets the next non-digit command from global-map"?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calling universal-argument with overriding-local-map
@ 2022-01-05 17:39 xenodasein--- via Users list for the GNU Emacs text editor
2022-01-05 18:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: xenodasein--- via Users list for the GNU Emacs text editor @ 2022-01-05 17:39 UTC (permalink / raw)
To: monnier; +Cc: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calling universal-argument with overriding-local-map
2022-01-05 17:39 Calling universal-argument with overriding-local-map xenodasein--- via Users list for the GNU Emacs text editor
@ 2022-01-05 18:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-01-05 18:46 UTC (permalink / raw)
To: help-gnu-emacs
> 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.
The code says:
if (!NILP (olp)
/* The doc said that overriding-terminal-local-map should
override overriding-local-map. The code used them both,
but it seems clearer to use just one. rms, jan 2005. */
&& NILP (KVAR (current_kboard, Voverriding_terminal_local_map))
&& !NILP (Voverriding_local_map))
keymaps = Fcons (Voverriding_local_map, keymaps);
It seems the doc isn't clear cut and there's not much more info to
accompany this commit d64cdc59724b7caca47913d5beb2b4a54f7b7c91.
I you want to change this behavior (or fix/improve the doc)
I recommend you `M-x report-emacs-bug`.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-05 18:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 17:39 Calling universal-argument with overriding-local-map xenodasein--- via Users list for the GNU Emacs text editor
2022-01-05 18:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2022-01-05 12:06 xenodasein--- via Users list for the GNU Emacs text editor
2022-01-05 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).