Didier Verna wrote:
Alexey Mahotkin <alexm(a)hsys.msk.ru> wrote:
> Suppose there is a
>
> (desktop-read)
>
> in init.el, and
>
> (custom-set-variables '(user-mail-address "morozov(a)novosoft.ru")),
>
> in custom.el. Now if desktop being read contains .html file then
> html-mode asks again and again: "Your mail address: alex@localhost" or
> something like that, because it is not yet customized.
>
> Surely one can move (setq user-mail-address "") to init.el, before
> (desktop-read), but there must be a more generic way to address that
> issue, what do you think?
You can try to swap the order of custom / init files reading. That's
what I do at the top of my init file:
,----
| (let ((real-custom-file custom-file))
| (setq custom-file "nonsense")
| (load real-custom-file)
| (add-hook 'after-init-hook
| `(lambda () (setq custom-file ,real-custom-file)))
| )
`-----
Note that depending on the XEmacs version you use, the variable
`custom-file' might not exist at the time of evaluating this form (this is a
recent feature of 21.5). If you're not using a 21.5 version, you must replace
`custom-file' by the explicit file name instead. Stephen might have applied
the corresponding patch to the gamma series, but I don't know.
> There probably exists a reason not to simply swap the order of execution of
> init.el and custom.el...
Probably... actually, I can't remember what it is and I had planned to
search in the archives, but it's quite a long time ago.
the reason is called "hystery".
btw in Arch XEmacs, written years ago [!], it says in
http://www.xemacs.org/Architecting-XEmacs/init-files.html:
The custom init file is where the custom package writes its options. This
obviously needs to be a separate file from the standard init file. It should
also be loaded before the init file rather than after, as is usually done
currently, so that the init file can override these options if it wants to.
imo we should just change the order and see what happens.
--
Didier Verna, didier(a)lrde.epita.fr,
http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 53 14 59 47
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 44 08 01 99 didier(a)xemacs.org
--
ben
I'm sometimes slow in getting around to reading my mail, so if you
want to reach me faster, call 520-661-6661.
See
http://www.666.com/ben/chronic-pain/ for the hell I've been
through.