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: Philippe Vaucher
Subject: Re: custom-set-variables considered harmful
Date: Fri, 1 Dec 2017 10:51:15 +0100


Can you maybe enlighten me about what problem c-s-v solves that would have me start to use it?

Your explicit ‘setq’ calls are perfectly fine as long as the variables you set do not have a setting function
assigned to them. However, if they do have setter functions, then the behaviour will not be correct.
It has been suggested that you manually look at the ‘defcustom’ definitions of the variables so that
you know which ones doesn't work with ‘setq’.

The only reason people can get away with not doing this is because there are so few custom variables
that use setter functions.

Ah, well in my case it was just ignorance that setter functions can exist. That and the fact that "it just works" 99% of the time with most variables and if you `setq` the variable prior to loading the package makes it hard to notice there's a problem.

I'll try to migrate my config toward use-package `:custom` directive.

Philippe

reply via email to

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