help-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: John Mastro
Subject: Re: Using "Emacs Configure" **and** modifying .emacs
Date: Tue, 15 Aug 2017 15:25:56 -0700

Emanuel Berg <moasen@zoho.com> wrote:
> 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. 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.

> However that doesn't work - it won't evaluate, and the byte compiler -
> which doesn't mention the supposed "setq error" by the way - the byte
> compiler doesn't accept the New Deal, saying either

It's not an error to use `setq' on variables with custom setters.

>     Wrong type argument: symbolp
>
> or
>
>     Attempt to set a constant symbol: nil

`customize-set-variable' is a function, so its arguments are evaluated.
In other words, it's like `set' rather than `setq'.

        John



reply via email to

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