emacs-devel
[Top][All Lists]
Advanced

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

Re: custom-set-variables considered harmful


From: Clément Pit-Claudel
Subject: Re: custom-set-variables considered harmful
Date: Fri, 24 Nov 2017 12:37:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 2017-11-24 02:16, Stefan Monnier wrote:
>> Is there a particular reson you're not using ‘customize-set-variable’
>> for all values?
> 
> Because I want the code to look as much as possible like "manually
> written Elisp", and `setq` is what is used in 99% of the Elisp
> customization code.

I think that's a bug, though — multiple packages of mine have specific code to 
deal with this (users using setq instead of customize-set-variable).

>> It would be more consistent, and also avoid problems
>> in case a package is changed and a setter function is added to
>> a variable which previously did not use it.
> 
> Note that as long as the `setq` is within the magical
> custom-autogenerated-user-settings form, it will behave correctly even
> if the variable has a setter function.

I like the direction of this patch very much, but I'm not a fan of this: it 
seems too error-prone.  It'd be much better if copying from the special form 
was safe (at least in the vast majority of cases).

> The difference will only affect
> those users who take this code and then copy it elsewhere.

But isn't one of the selling points of this patch to make copying easier?

Thanks,
Clément.



reply via email to

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