emacs-devel
[Top][All Lists]
Advanced

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

Re: Calling (package-initialize) sooner during initialization


From: Oleh Krehel
Subject: Re: Calling (package-initialize) sooner during initialization
Date: Tue, 28 Apr 2015 09:42:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Artur Malabarba <address@hidden> writes:

>> I super-agree on this point. I even switched to using this macro,
> just
>> to prevent customize from writing stuff to my .emacs (which normally
> is
>> a one-liner):
>>
>> (defmacro csetq (variable value)
>> `(funcall (or (get ',variable 'custom-set) 'set-default) ',variable ,
> value))
>> (csetq tool-bar-mode nil)
>> (csetq menu-bar-mode nil)
>> ...
>>
>> It works out pretty well, basically Customize isn't aware that I've
>> modified anything. So when something does get saved (I think
> recently
>> package.el saved something like a list of installed packages), I see
>> only that one thing, instead of a horrible blob of 100 variables.
> That's
>> a lot more manageable.
>
> I'm not aware of any situation where a plain setq would cause
> customize to save something to your init file. Could you give an
> example where that macro helped you?

A plain setq doesn't get in the way, but it also doesn't call the :set
property of defcustom. For instance, this works fine:

    (csetq ediff-diff-options "-w")

but this doesn't work:

    (setq ediff-diff-options "-w")

Oleh







reply via email to

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