unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 47813@debbugs.gnu.org
Subject: bug#47813: 28.0.50; Confusing new calling convention for define-minor-mode
Date: Sat, 17 Apr 2021 04:28:44 +0200	[thread overview]
Message-ID: <8735vp7ig3.fsf@web.de> (raw)
In-Reply-To: <jwvh7k5d9p1.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 16 Apr 2021 20:44:24 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 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?

There should be some indication, somewhere, that zero keywords are
currently not allowed.

In my case, eldoc could have been such a source of information, by
letting showing something like

 (mode doc keyword1 val1 [keyword val ...] &rest body)

You could also make this warning:

"Use keywords rather than deprecated positional arguments to
`define-minor-mode'"

- or at least the docstring of `define-minor-mode' - tell that if no
keywords can be provided one can use "e.g. :lighter nil" to get rid of
the warnings (and maybe that this will probably not be necessary any
more in the future).

Apart from that, we could allow an explicit :body keyword, though that
would have been most helpful before your change, and once the sources of
examples of the old calling convention are gone, it would get completely
redundant, so I guess that is not a good proposal.


Thanks,

Michael.





  reply	other threads:[~2021-04-17  2:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  1:51 bug#47813: 28.0.50; Confusing new calling convention for define-minor-mode Michael Heerdegen
2021-04-16  3:23 ` Stefan Monnier
2021-04-16  3:27   ` Stefan Monnier
2021-04-16  4:26   ` Michael Heerdegen
2021-04-16 12:43     ` Stefan Monnier
2021-04-16 23:53       ` Michael Heerdegen
2021-04-17  0:44         ` Stefan Monnier
2021-04-17  2:28           ` Michael Heerdegen [this message]
2021-04-17  3:42             ` Stefan Monnier
2021-04-17 11:49               ` Lars Ingebrigtsen
2021-04-17 13:57                 ` Stefan Monnier
2021-04-17 23:21                   ` Michael Heerdegen
2021-04-18  3:56                     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735vp7ig3.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=47813@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).