emacs-devel
[Top][All Lists]
Advanced

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

Re: Comments on setopt


From: Philip Kaludercic
Subject: Re: Comments on setopt
Date: Wed, 16 Feb 2022 22:57:32 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> over using `customize-set-variable' directly (indeed, I believe the
>> verbosity of the name `customize-set-variable' is a significant reason
>> why many people prefer to use `setq' for everything, even when they
>> know that user options can have setters).
>
> Hmm... I'm not sure I understand the motivation behind the introduction
> of `setopt`, to be honest.  As pointed out, `setopt` should probably not
> be used at top-level in a `.emacs` because Custom will think this was
> set via `customize-set-variables` and will save that setting back into
> `custom-file` next time we ask to save the customized variables.

The issue lies in `customize-set-variable' modifying the user theme.
Without that (or if one can indicate that a customisation shouldn't be
added and stored again in the user theme).

> As a general rule, it should also be avoided by packages because
> packages shouldn't change user options behind the user's back.
>
> So the remaining places where it makes sense to use it are fairly
> rare, AFAICT.

I honestly don't see any at all, if the issue with
`customize-set-variables' is considered to be critical.

> Am I missing something?
>
>
>         Stefan
>

-- 
        Philip Kaludercic



reply via email to

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