GNU bug report logs -
#72624
31.0.50; minor-mode-overriding-map-alist doesn't have higher priority than local map, which differs from docs
Previous Next
Reported by: mr.meowking <at> tutamail.com
Date: Wed, 14 Aug 2024 15:51:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> ‘minor-mode-overriding-map-alist` should have higher priority than the
> buffer local keymap.
According to my tests, it does.
> (defvar-keymap mk/test-map
> "RET" #'(lambda () (interactive) (message "mk/test-map")))
[...]
> (keymap-set outline-minor-mode-map "<return>" #'(lambda () (interactive)
> (message "outline-minor-mode-map")))
Binding a command to "<return>" is generally a bug.
You should bind it to "RET" instead, unless you really know what
you're doing.
The way the bug manifests itself is exactly in the way you show here.
Emacs will first look for a binding for `return` and if it finds one
it'll use it in preference to a binding for `RET`, regardless of the
relative precedence of the keymaps involved.
[ Side note:
> ```elisp
[...]
> (setq minor-mode-overriding-map-alist '((outline-minor-mode . nil)))
[...]
> ```
`minor-mode-overriding-map-alist` is automatically buffer-local, so
setting it at the toplevel of an ELisp file doesn't make much sense: it
will set it only in the buffer that happens to be current when you load
that ELisp file. ]
Stefan
This bug report was last modified 322 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.