[Top][All Lists]

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

Re: custom-set-variables considered harmful

From: Elias Mårtenson
Subject: Re: custom-set-variables considered harmful
Date: Thu, 30 Nov 2017 00:35:58 +0800

On 29 November 2017 at 23:00, Stefan Monnier <address@hidden> wrote:
> Thus, if you use ‘setq’ instead of ‘custom-set-variable’ you need to
> manually check every single variable to ensure they don't have setter
> functions assigned.  If you want to be thorough (nobody is) you also
> need to check them every time your modules are updated.  This is not
> just a theoretical situation.

Note that there are also many situations where the var has a setter, yet
doing (setq foo val) on it from your ~/.emacs will still work correctly
(as long as you do it before loading the library).
I'd argue it's actually the most frequent case.

It is. But why does that make a difference? There are plenty of other things that
works almost all the time, even though it's not recommended.

All I'm trying to say is that we currently have two methods for setting custom

  - setq - works almost all the time
  - custom-set-variable - works all the time

I'm not saying that anyone should make setq not work. I'm simply suggesting that
perhaps it's a good idea to recommend users that they use the one, simple,
mechanism that exists and works all the time.

Wouldn't that make things simpler in the long run?


reply via email to

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