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

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

Re: Differentiate minor mode and global minor mode


From: Joost Kremers
Subject: Re: Differentiate minor mode and global minor mode
Date: Sat, 18 Apr 2020 23:37:43 +0200
User-agent: mu4e 1.4; emacs 26.3


On Thu, Apr 16 2020, Štěpán Němec wrote:
On Thu, 16 Apr 2020 14:13:40 +0200
Joost Kremers wrote:
I was wondering if there's a proper way to determine if a minor mode
is being turned on locally or globally?
[...]
Same as with any other minor mode, calling `global-writeroom-mode' will also set the same-named variable to t, so you can just check for that.

But `global-writeroom-mode` would be t even if the user runs `M-x writeroom-mode` (e.g., in a buffer where `global-writeroom-mode` does not activate `writeroom-mode` by default). Though that's probably not a common use-case.

Thanks, I'll need to think about the best way to deal with this.

--
Joost Kremers
Life has its moments



reply via email to

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