From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> (define-minor-mode foo-mode nil)
> its docstring will be
>
> "Toggle Foo mode on or off.
> With a prefix argument ARG, enable Foo mode if ARG is
> positive, and disable it otherwise.=C2=A0 If called from Lisp, enable<= br class=3D"gmail_msg"> > the mode if ARG is omitted or nil, and toggle it if ARG is =E2=80=98to= ggle=E2=80=99."
>
> This appears to indicate that (foo-mode 'banana)
> should disable foo-mode, but it enables it.
No, it does not suggest that.=C2=A0 But to be clearer, it should
probably explicitly address the non-nil and non-`toggle' case,
like so:
=C2=A0 If called from Lisp, enable the mode if ARG is omitted or
=C2=A0 nil, toggle it if ARG is =E2=80=98toggle=E2=80=99, and disable it if= ARG is
=C2=A0 any other non-nil value.
(And place the Lisp description in a separate paragraph
from the interactive description.)
> I think minor modes should simply not allow anything but
> integers and 'toggle for ARG, avoiding this confusion.
Why?=C2=A0 There is no confusion possible, once the doc string
explicitly speaks about all possible argument values.
Why would you change the behavior, instead of just clarifying
the doc?