GNU bug report logs -
#54161
27.2; `define-minor-mode' with alist of key bindings
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 25 Feb 2022 17:49:02 UTC
Severity: normal
Found in version 27.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 54161 <at> debbugs.gnu.org (full text, mbox):
> I think the small source of confusion is whether these arguments are
> evaluated.
Yes, exactly.
> How about making that clearer, e.g.
That helps quite a bit, yes.
It kind of relies on a careful reading - the only
difference is that you've added "values" in "where
KEY and BINDING are suitable values for `define-key'."
^^^^^^
But that's probably enough. I had suggested this:
> An example in the doc would help, along with
> speaking of something "acceptable to `define-key'
> as an arg - something such as what `kbd returns."
___
The other problem reported in this bug is that an
(unquoted) `(kbd ">")' does NOT raise an error
(unlike, say, `(kbd "C->")').
Neither I nor Gilles understands why no error is
raised in the case of unquoted `(kbd ">")'. And it
was that that introduced confusion in the case at
hand. The user had written this:
(define-minor-mode narrative-mode
"..."
:lighter " narr"
:keymap
'(((kbd "<") . electric-left-angle) ; <== No error
((kbd ">") . electric-right-angle) ; <== No error
((kbd "C-<") . quoted-insert-left-angle-bracket)
((kbd "C->") . quoted-insert-right-angle-bracket)))
https://emacs.stackexchange.com/q/70714/105
The fact that no error is raised for the first
two of those bindings led to mistakenly thinking
that there was something wrong with the latter
two `kbd' sexps, rather than seeing that the
problem was not evaluating any of the `kbd' sexps.
I would have liked to get some explanation of
this in this bug thread. Plus a fix for the
behavior in the case of the first two bindings,
if that behavior is in fact bugged.
Alas, no consideration of this problem at all
(whether it represents an Emacs behavior bug or
just our lack of understanding).
This bug report was last modified 3 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.