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

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

Re: reading compile.el, modifying settings


From: Sam Steingold
Subject: Re: reading compile.el, modifying settings
Date: Thu, 05 May 2011 14:34:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Tassilo,

> * Tassilo Horn <gnffvyb@zrzore.sfs.bet> [2011-05-05 20:15:29 +0200]:
> Sam Steingold <sds@gnu.org> writes:
>>
>> compilation-error-regexp-alist is defined with defcustom, so it should
>> be modified with custom-set-variables, not with setq.  Don't ask.
>
> No, that's not true.  You can setq any defcustom as if it was a defvar.

Sure.  You can setq any symbol.
However, the _effect_ of setq on a variable defined with defcustom is
different - it is not respected by emacs on the same level as
custom-set-variables.
At least it was not a few years ago, when I had the same problem - my
setting being ignored - as Paul is having now.

1. some packages use symbol properties in addition to the symbol value,
   these are modified by custom-set-variables automatically

2. some custom variables have fancy setters which are called by
   custom-set-variables but not by setq (like symbol macros in CL)

In short, the rule of thumb is: do not use setq on custom variables, use
custom-set-variables instead.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://honestreporting.com http://camera.org http://palestinefacts.org
http://ffii.org http://www.PetitionOnline.com/tap12009/ http://truepeace.org
"Syntactic sugar causes cancer of the semicolon."       -Alan Perlis




reply via email to

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