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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Jun 2020 09:13:53 +0300

> Date: Fri, 5 Jun 2020 13:39:27 -0700 (PDT)
> From: Drew Adams <[email-masked]>
> 
> The doc needs improvement when describing calling the mode from Lisp.
> 
> 1. The doc string of `define-minor-mode' says this:
> 
>      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 otherwise (including if
>      the argument is omitted or nil or a positive integer).

It actually says this:

  Interactively with no prefix argument, it toggles the mode.
  A prefix argument enables the mode if the argument is positive,
  and disables it otherwise.

  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 otherwise (including
  if the argument is omitted or nil or a positive integer).

> 3. The Elisp manual doc says this (node `Defining Minor Modes'):
> 
>      From Lisp, an argument of 'toggle' toggles the mode, whereas an
>      omitted or 'nil' argument enables the mode.

It actually says this:

     The toggle command takes one optional (prefix) argument.  If called
     interactively with no argument it toggles the mode on or off.  A
     positive prefix argument enables the mode, any other prefix
     argument disables it.  From Lisp, an argument of ‘toggle’ toggles
     the mode, whereas an omitted or ‘nil’ argument enables the mode.

Are you reading obsolete docs?