bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands


From: Michael Heerdegen
Subject: bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands
Date: Mon, 08 Jun 2020 19:16:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> That's misleading enough to make me wonder whether,
> in that case, it might be better to say nothing at
> all about the call-from-Lisp case, forcing Lisp
> users to consult the code.

How about leaving only cases like ARG -> '- undocumented?

  When called from Lisp, the mode command toggles the mode if the argument
  is `toggle', disables the mode if the argument is a non-positive
  integer, and enables the mode if the argument is a positive integer or
  omitted or nil.

Good enough for daily business.  And we are lucky: since an additional
`prefix-numeric-value' doesn't harm (it's idempotent), it's not a
problem if it's called on the arg before passing it to the mode function
and by the mode function again.

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]