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: Mauricio
Subject: Re: Replacing custom-set-variables
Date: Mon, 15 Sep 2008 11:06:39 -0300
User-agent: Thunderbird 2.0.0.16 (X11/20080724)


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


Based on all comments, maybe a begginer like
me would prefer custom-set-... until I learn
more about a few emacs details, specially
regarding to how modes deal with variables.

Best,
MaurĂ­cio





reply via email to

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