unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47813: 28.0.50; Confusing new calling convention for define-minor-mode
@ 2021-04-16  1:51 Michael Heerdegen
  2021-04-16  3:23 ` Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Heerdegen @ 2021-04-16  1:51 UTC (permalink / raw)
  To: 47813; +Cc: Stefan Monnier


Hello,

the new advertised calling contention for `define-minor-mode' is

| (mode doc &rest body)

Nothing wrong with that, but this part from the doc string:

| If you provide BODY, then you must provide at least one keyword
| argument.

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?  Else the calling
convention should be made clearer in some way.

TIA, Michael.


In GNU Emacs 28.0.50 (build 48, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-04-15 built on drachen
Repository revision: ed6b86457ddf73cc2cb2df6a1cf8dab79a265a93
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid






^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-18  3:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).