bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25505: 24.5; doc of `define-minor-mode': incorrect for :keymap


From: Stefan Kangas
Subject: bug#25505: 24.5; doc of `define-minor-mode': incorrect for :keymap
Date: Sat, 25 Sep 2021 09:12:20 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tags 25505 fixed
close 25505 28.1
thanks

npostavs@users.sourceforge.net writes:

> tags 25505 notabug
> quit
>
> Drew Adams <drew.adams@oracle.com> writes:
>
>> For :keymap, the doc string says "Same as the KEYMAP argument."
>> Similarly the doc in (elisp) `Defining Minor Modes'.  This does not
>> appear to be correct.
>>
>> For positional arg KEYMAP, the doc string says:
>>
>>   If non-nil, it should be a variable name (whose value is a keymap),
>>   or an expression that returns either a keymap or a list of
>>   arguments for `easy-mmode-define-keymap'.
>>   ...
>>
>> But the value of :keymap apparently cannot be a variable name whose
>> value is a keymap or an expression that evaluates to a keymap.  The
>> :keymap value you pass is apparently not evaluated - unlike other
>> keyword values such as :group.
>
> The doc says "variable name" as opposed to "expression", I think it's
> clear that expression will be evaluated, and something which is not an
> expression will not be evaluated.  I guess we could add "it should be an
> unquoted variable name..."

(Noam asked for suggestions here years ago, but there have been none.)

Having read this bug report, I think "unquoted variable name" fixes the
confusion here, so I've made that change on master (commit 293b8c71b2).
This change will be a part of the upcoming Emacs 28.1.

I'm consequently closing this bug report.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]