GNU bug report logs -
#43617
27.1; Define-minor-mode keybindings not get precedence over global keymap
Previous Next
Reported by: dalanicolai <at> gmail.com
Date: Fri, 25 Sep 2020 18:11:02 UTC
Severity: normal
Tags: notabug
Found in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > The cons ((kbd "C-n") . 'foo) is exactly such a
> > (KEY . BINDING) pair - both KEY and BINDING are
> > suitable arguments for `define-key'.
>
> Is it?
>
> ELISP> (define-key global-map '(kbd "C-n") ''foo)
> *** Eval error *** Wrong type argument: arrayp, (kbd "C-n")
I get your point. I guess maybe there are two ways
to read the doc string.
The most _useful_ behavior for users, IMO, is for
`define-minor-mode' to allow expressions in arg
KEYMAP (when it's such a list) that correspond to
what a user writes in `(define-key ...)'.
Is that particular list form of KEYMAP intended
mostly for programmatically supplying such a list,
or for users to write such a list?
If the former, why is it needed/helpful at all,
since code can just as easily create a keymap arg.
If the latter, it gives users an easy way to write
key bindings directly for `define-minor-mode'.
I hadn't even paid attention to the existence of
such a form for the KEYMAP arg. But it looks like
it could be handy for users to write - IF the sexp
to write is simple and straightforward.
If users instead need to use backquote syntax or
jump through other hoops to write such a KEYMAP
sexp, then what's the point - what's the use case?
Maybe there _is_ a programmatic use case. If so,
what is it?
This bug report was last modified 4 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.