GNU bug report logs - #47813
28.0.50; Confusing new calling convention for define-minor-mode

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 16 Apr 2021 01:52:01 UTC

Severity: normal

Found in version 28.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: 28.0.50; Confusing new calling convention for define-minor-mode
Date: Thu, 15 Apr 2021 23:23:07 -0400
> says that the convention as printed is not valid - and indeed it
> isn't -- e.g. this errors:
>
>   (define-minor-mode test-mode "..." (if test-mode 17 23))
>
> Is it possible to make that keyword-less case work?

It's hard to do it as long as there is code out there that uses the old
convention where the first element of "body" is actually interpreted as
the `lighter` argument.

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
new rather than the old 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.


        Stefan





This bug report was last modified 4 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.