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: Lennart Borgman (gmail)
Subject: Re: Replacing custom-set-variables
Date: Sun, 14 Sep 2008 02:17:56 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Drew Adams wrote:
>> 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?
> 
> Typically:
> 
> (setq var1 val1
>       var2 val2
>       var3 val3)
> 
> But see also `setq-default'; it might be more appropriate for some variables.
> 
> As an alternative to not using `custom-set-variables', consider having a
> separate custom file, the value of variable `custom-file', and letting 
> Customize
> manage `custom-set-variables' there. That will keep Customize out of your init
> file (~/.emacs). See the Emacs manual, node Saving Customizations.


I think that is much better since setq/setq-default actually does not
work for all custom variables. (See `defcustom' for details.)




reply via email to

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