[Top][All Lists]

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

RE: Using "Emacs Configure" **and** modifying .emacs

From: Drew Adams
Subject: RE: Using "Emacs Configure" **and** modifying .emacs
Date: Tue, 15 Aug 2017 16:09:44 -0700 (PDT)

> > According to the thread, `customize-set-variable' should be used
> > rather than setq.
> I would put it differently: it's fine to use `setq' on any variable,
> it's just that there may be more to be done. 

Maybe, maybe not.

A `:set' function for a given `defcustom' can do anything it wants.
It need not set the option value at all (surprise!).  It can do
anything - or nothing.

Typically it does set the value.  And typically it uses a function
such as `custom-set-default' to set it, which does what you might
expect.  And often, as you say, it does something additional, often
after setting the value (or before, or both).

But you can't count on a typical case, any more (well maybe a
little more) than you can count on just using `setq' to DTRT.

> You could therefore use `customize-set-variable', but my
> preference is generally to view the variable's definition,
> see whether a custom setter is defined, and
> decide if I need to do anything about it.

That's fine.  Extra work, in general, but it shouldn't hurt,
at least not in the short term.

Not sure why you would prefer that, but it sounds like it is so
that if you find you can get away with `setq' in some case then
you prefer to use that.  Is that it?

And what if the library changes the `:set' function and you
upgrade?  I'm not being facetious - I really don't see the

reply via email to

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