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.
--
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