sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes:
Hrvoje> Init file can override Custom options although custom is
loaded later.
Hrvoje> Custom is much smarter than it looks. I can elaborate if you want.
I'd appreciate it.
The following explanation only elaborates on why it is OK for
custom-set-variables to be executed after .emacs. It does not argue
that it shouldn't be executed before.
custom-set-variables differs from an ordinary `setq' in your .emacs in
that it doesn't set the value of any of the variables. They merely
store the Lisp expression that is to calculate the value into a
property of the symbol.
Only when the `defcustom' form is evaluated, this property gets
evaluated too, and stored to the symbol's value slot. This is
important because it allows "dependent" things to work. For instance,
if you have:
(defcustom foo 3
...)
(defcustom bar (* foo 5) ; default
...)
Then, if you customize `foo' to 4 and don't touch bar, `bar' will be
correctly set to 20.
Regardless of all this, `defcustom' retains the important property of
`defvar' which is that it doesn't touch the value of variables which
are bound (already have a value). So if you say:
(setq foo 132)
then the custom-set-variables will still set the property, but
defcustom will *not* change the value. That's how the Customize
buffer knows that a value has been "modified outside customize".