all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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 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

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 12:06 Calling universal-argument with overriding-local-map 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
  -- strict thread matches above, loose matches on Subject: below --
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

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.