[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: |
Eli Zaretskii |
Subject: |
bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands |
Date: |
Sat, 06 Jun 2020 09:13:53 +0300 |
> Date: Fri, 5 Jun 2020 13:39:27 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
>
> 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?
bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands,
Eli Zaretskii <=
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Drew Adams, 2020/06/06
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Eli Zaretskii, 2020/06/06
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Drew Adams, 2020/06/06
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Michael Heerdegen, 2020/06/07
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Eli Zaretskii, 2020/06/07
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Michael Heerdegen, 2020/06/07
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Drew Adams, 2020/06/07
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Michael Heerdegen, 2020/06/08
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Drew Adams, 2020/06/08
- bug#41727: 26.3; Doc of `define-minor-mode' and minor-mode commands, Michael Heerdegen, 2020/06/09