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

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

bug#47813: 28.0.50; Confusing new calling convention for define-minor-mo


From: Stefan Monnier
Subject: bug#47813: 28.0.50; Confusing new calling convention for define-minor-mode
Date: Fri, 16 Apr 2021 20:44:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Hmm... the warning don't exactly say to delete those three elements, so
>> I think it would help to understand how you got from "saw the warning"
>> to "deleted all those nil's": that's the probably where we need to
>> improve the doc.
>
> What is currently the correct syntax if you can't provide any keywords
> because your definition only has a body to specify?

The three args of the old convention correspond to (by order of
appearance): `:init-value`, `lighter`, `:keymap`.
So in the patch I installed into `master` I used `:lighter nil` to
replace three `nil`s (since `:init-value` and `:keymap` should only be
used in exceptional circumstances, IMO).

> So that was what Emacs presented to me: a calling convention that told
> to use (mode doc &rest body) which I did, and OTOH a non-decreasing
> number of warnings to use keywords please , but I have none to specify,
> so ... what?

Yes, I understand the problem, but I'm not sure how best to address it.
Do you have some suggestion for what could have helped you?


        Stefan






reply via email to

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