[Top][All Lists]

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

Re: '(emacs)Init Syntax' customizable minor mode variables

From: Michael Heerdegen
Subject: Re: '(emacs)Init Syntax' customizable minor mode variables
Date: Fri, 12 Aug 2022 04:14:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

YE <> writes:

> That's right. It's hard to comprehend that sentence also because one
> normally doesn't expect variables to perform an action, especially "to
> enable the mode". Typically, one expects functions to do the action and
> variables to store values.

In that case they are more than plain Elisp variables, in some sense.

It's good that we have a different name: "(user) options".

> Does it mean the word "enable" in that paragraph should be read not as
> "turn on the minor mode" but rather "store a state marker for the turned
> on minor mode"? If it is so, than the source of my confusion regarding
> that sentence is found.
> The discussed sentence:
> >    Some customizable minor mode variables do special things to enable
> > the mode when you set them with Customize, but ordinary ‘setq’ won’t do
> > that; to enable the mode in your init file, call the minor mode
> command.

Note that what I mentioned was only describing one possibility (of a
minority of minor modes).  I think in the majority of cases the setter
just calls the mode function (`custom-set-minor-mode').  Doing "special
things" is probably an exception.

So what you should keep in mind that (setq MODE-VARIABLE VALUE) doesn't
turn the mode in a lot of cases, but Customize is more user friendly (as
a graphical interface), so it takes care of all cases and setting the
mode variable from Customize should always work.  In most cases setting
the mode variable from Customize will just call the mode function.


reply via email to

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