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

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

Re: Replacing custom-set-variables


From: Tim X
Subject: Re: Replacing custom-set-variables
Date: Sun, 14 Sep 2008 14:25:53 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Mauricio <briqueabraque@yahoo.com> writes:

> Hi,
>
> In .emacs I have a few variables defined using:
>
> (custom-set-variables
>  '(var1 val1)
>  '(var2 val2)
>  '(var3 val3))
>
> How can I define those same variables in .emacs
> without using custom-set-variables?
>

Just use setq e.g.

(setq var1 value1)

but don't forget to also remove the corresponding bits in the custom
section. 

but can I ask why you want to do this? 

For a long time, I stuck to using the older (setq ....) method, but now
I've switched to using customize whenever possible. I've noticed that
some 'odd' behavior I used to get with the older traditional method have
gone away now that I'm using customize as much as possible. I do still
have some stuff to convert over and plan to do so one day when I get the
motivation.....

In particular, I noticed some inconsistent behavior between some
packages that supported customize when I also configured them 'manually'
(and without corresponding settings in the customize section). for some
reason, the default customize setting would override my setq setting. I
never investigated very closely, but suspect it was related to how the
initialization of the custom variables was handled. the quick and easy
solution was to just set the values via customize and remove my hand
crafted version. 

I've also found using customize is also useful in alerting you to
changes in packages after an upgrade - something you generally don't get
using the older manual approach. 

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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