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 17:08:00 -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 21:09:54 +0200]:
> Sam Steingold <sds@gnu.org> writes:
>> 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.
>
> If that really happens, I'd consider it a bug.

Agreed.
However, these bugs are hard to reproduce, as you have just discovered
yourself.
It is much easier to work around them.

>> 1. some packages use symbol properties in addition to the symbol value,
>>    these are modified by custom-set-variables automatically
>
> ,----
> | ;; foo is not defined before
> | (setq foo 17)
> | ;; now load its defcustom
> | (defcustom foo 111
> |   "Bla bla")
> | ;; still has my value plus the props of the defcustom
> | (cons foo (symbol-plist 'foo))
> | ==> (17 standard-value (111) custom-requests nil variable-documentation 
> "Bla bla")
> `----

that's my point - a custom variable is much more than just a symbol-value.

>> In short, the rule of thumb is: do not use setq on custom variables,
>> use custom-set-variables instead.
>
> I really don't buy that.

That's just as well because I am not selling anything.
I wonder, however, if my solution solves Paul's problem.

> My emacs is highly customized in plain lisp only, so that I can
> comment what I do and structure it according to my likings.

Mine too - and I use custom-set-variables for all custom vars in ~/.emacs.
And, of course, both setq and custom-set-variables are "plain lisp".



-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://camera.org http://mideasttruth.com
http://www.PetitionOnline.com/tap12009/ http://iris.org.il http://ffii.org
There are 3 kinds of people: those who can count and those who cannot.




reply via email to

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