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: Elias Mårtenson
Subject: Re: custom-set-variables considered harmful
Date: Fri, 24 Nov 2017 15:04:22 +0800

On 14 November 2017 at 00:26, Stefan Monnier <address@hidden> wrote:
> When writing customizations, instead of writing
>
>     (custom-set-variables
>      ;; Big ugly warning which doesn't help enough.
>      '(VAR1 VAL1)
>      '(VAR2 VAL2 nil '(REQUEST) COMMENT)
>      '(VAR3 VAL3)
>      ...)
>
> we write
>
>     (autogenerated-custom-settings
>       ;; Big warning, still, but less important.
>       (setq VAR1 VAL1)
>       (require 'REQUEST)
>       (customize-set-variable VAR2 VAL2 COMMENT)
>       (customize-set-variable VAR3 VAL3)
>       ...)

Here's a sample patch to do that.  Comments?

Is there a particular reson you're not using ‘customize-set-variable’ for all values?
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.

Regards,
Elias 


reply via email to

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