GNU bug report logs -
#52007
26.3; Doc of `define-globalized-minor-mode' and global(ized) minor modes
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sat, 20 Nov 2021 22:45:01 UTC
Severity: minor
Found in version 26.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 21 Nov 2021 08:41:13 +0200
with message-id <83czmuroxi.fsf <at> gnu.org>
and subject line Re: bug#52007: 26.3; Doc of `define-globalized-minor-mode' and global(ized) minor modes
has caused the debbugs.gnu.org bug report #52007,
regarding 26.3; Doc of `define-globalized-minor-mode' and global(ized) minor modes
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
52007: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52007
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
AFAICT, neither the doc strings nor the Elisp manual (node `Defining
Minor Modes') tells you how, from Lisp, to turn OFF a global(ized) minor
mode. It tells you how to turn it ON from Lisp, and it tells you that
you can use the Customize UI to turn it on and off. But it doesn't tell
you how to turn it OFF, i.e., to turn off the mode in all buffers.
The doc for a globalized minor mode `foo-mode' says this:
With prefix ARG, enable Global-Foo mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
The first sentence describes the interactive behavior. The second tells
you how to turn it ON from Lisp. How to turn it off? The doc should at
least make a connection between the prefix-arg value and the Lisp arg.
Please fix this. It should be clear from the docs how to turn the mode
off everywhere, as well as on everywhere. This can even be important if
some defcustom has a :set that needs to, e.g., turn it off everywhere
and then turn the mode back on wherever it was on.
Turning on `debug-on-entry' for a global(ized) minor mode, and then
using the Customize UI to toggle its option, a user can discover an arg
they can pass with Lisp to turn it off. But users shouldn't need to
jump through such hoops to find out how to turn it off.
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19042
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
[Message part 3 (message/rfc822, inline)]
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Sat, 20 Nov 2021 22:44:23 +0000
>
> The doc for a globalized minor mode `foo-mode' says this:
>
> With prefix ARG, enable Global-Foo mode if ARG is positive;
> otherwise, disable it. If called from Lisp, enable the mode if
> ARG is omitted or nil.
You are looking at an old Emacs. Emacs 28 says:
With prefix ARG, enable Global Display-Line-Numbers mode if ARG is
positive; otherwise, disable it.
If called from Lisp, toggle the mode if ARG is ‘toggle’.
Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
So this is already fixed, and I'm closing this bug.
This bug report was last modified 3 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.