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: Tue, 09 Jun 2020 09:58:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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

> > 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.
>
> That's what we say now, and the reason I filed the bug.

No, it's not, it doesn't contradict the implementation.  Did you read
carefully?

> Consider a case where some command A invokes a minor-mode
> command B, to turn B on or off for some purpose/extent.
> Consider the case where A's prefix arg is passed to B, to
> do that.
>
> The programmer writing the Lisp code to define A should
> know that s?he can just pass the raw prefix arg.  The
> resulting code will be simpler, easier to read, etc.

We don't know if the original author intended the semantics of the
documentation or of the implementation.  If we are sure the current
implementation is what was intended I would be ok with documenting it,
but it's really far from important IMHO.

I leave it to Eli to decide.

Michael.





reply via email to

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