[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.
- Re: custom-set-variables considered harmful, (continued)
Re: custom-set-variables considered harmful, Stefan Monnier, 2017/11/13
- Re: custom-set-variables considered harmful, Elias Mårtenson, 2017/11/24
- Re: custom-set-variables considered harmful, Elias Mårtenson, 2017/11/26
- RE: custom-set-variables considered harmful, Drew Adams, 2017/11/26
- Re: custom-set-variables considered harmful, Philippe Vaucher, 2017/11/28
- Re: custom-set-variables considered harmful, John Wiegley, 2017/11/28
- Re: custom-set-variables considered harmful, Elias Mårtenson, 2017/11/28
- Re: custom-set-variables considered harmful, Stefan Monnier, 2017/11/29
- RE: custom-set-variables considered harmful, Drew Adams, 2017/11/29
- Re: custom-set-variables considered harmful, Elias Mårtenson, 2017/11/29
- Re: custom-set-variables considered harmful, Scott Randby, 2017/11/29