[Top][All Lists]

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

Re: custom-set-variables considered harmful

From: Stefan Monnier
Subject: Re: custom-set-variables considered harmful
Date: Wed, 08 Nov 2017 10:17:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

I think you misunderstood my suggestion.  E.g. look at how VAR3 is
handled in my example:

     '(VAR3 VAL3)

is turned into

      (customize-set-variable VAR3 VAL3)

rather than into

      (setq VAR3 VAL3)

The idea was that VAR3 is a variable with a :setter.

> In the former case (or similar cases) the user might copy the setq and then
> be surprised that it does not work as expected.

This is already a problem since '(VAR VAL3) doesn't do what the user
intended when copied outside of the custom-set-variables block.  The new
doesn't aim to guarantee that copy&paste always works.  It just aims to
get a bit closer.

E.g. note that using customize-set-variable doesn't solve the problem
completely either (there are differences in terms of *when* the settings
is applied), but it will often work.

> In the latter, they would copy the setq, alter the value (possibly to
> an "illegal" value) and then be surprised it didnt work.

While the change I propose doesn't solve this problem, it doesn't make
it worse either, AFAICT.


reply via email to

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