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

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

bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental m


From: Stefan Monnier
Subject: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers
Date: Wed, 26 May 2021 18:41:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen [2021-05-27 00:33:10] wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>>> If I tweak my minor mode to be of my2-mode (change the init value to
>>> t)or my3-mode (force the init value to t using setq-default) types
>>> above, then my minor mode gets enabled globally in true sense (even in
>>> buffers created using get-create-buffer).
>>>
>>> In essence, setting the init value as t is not the same as enabling a
>>> globalized minor mode.
>>>
>>> Is this by design? 
>> Anybody know?
> Perhaps Stefan does; added to the CCs.

Maybe I misunderstand the question, but a minor mode is defined by
a function that can used to turn it ON/OFF and a variable that lets you
know where it's ON or OFF.

Setting the var directly rather than via the minor mode function just
breaks the abstraction and its behavior is thus "defined by
implementation" and subject to change.

Similarly `:init-value` is used to tell Emacs what is the initial state,
rather than to set this initial state.


        Stefan






reply via email to

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