Subject: Re: 28.0.50; Confusing new calling convention for define-minor-mode

From: Stefan Monnier <[email-masked]>
Date: Fri, 16 Apr 2021 08:43:48 -0400

>> That's why I introduced the warning and changed the arglist: I realized
>> that even though I think the old convention is inconvenient and
>> confusing, it seems that a lot of code (even brand new code) follows the
>> old rather than the new convention, so we need to be more proactive to
>> get people to abandon the old convention so we can at some point in the
>> future accept code like the one above.
> My problem was: When compiling my init file (I have a lot of personal,
> quite trivial, minor modes) I got 20 warnings, a whole bulk, then I did
> what the warnings said and deleted all those nil's, and then everything
> was broken.

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.

Another point is: after deleting those nil's, presumably you still got
the warning (because there still wasn't any keyword arg at the head), so
you should hopefully have seen that warning which would have helped
understand why "everything was broken".

> It's now hard to find out how to get your code correct and warning free
> at all.  Can we do something better to help people find the correct
> solution?

I hope we can.

        Stefan