I can't remember why the custom file is loaded after the init file. I
can't remember either if there's a good reason for it. However, it seems wrong
to me and I want it loaded before for several reasons. For instance, it is
boring not to get your visual settings at the first place (like, getting a
toolbar and then seing it disappear, with the frame resizing itself). Another
more important reason is that if you launch applications from your init file
(I launch Gnus from there), they won't get their customizations.
There is a clean way to load the custom file before anything else,
which is putting this at the top of init.el:
(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)))
)
However, this requires patching startup.el like this:
Index: startup.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/startup.el,v
retrieving revision 1.24.2.25
diff -u -r1.24.2.25 startup.el
--- startup.el 2001/01/16 12:17:06 1.24.2.25
+++ startup.el 2001/01/24 15:21:54
@@ -794,11 +794,11 @@
(if (not user-init-file)
(setq user-init-file
(find-user-init-file user-init-directory)))
+ (if (not custom-file)
+ (setq custom-file (make-custom-file-name user-init-file)))
(if (and user-init-file
(file-readable-p user-init-file))
(load user-init-file t t t))
- (if (not custom-file)
- (setq custom-file (make-custom-file-name user-init-file)))
(if (and custom-file
(or (not user-init-file)
(not (string= custom-file user-init-file)))
The only good reason I can see for loading the custom file after the
init file is to give the user the possibility of renaming it (in init.el, of
course). But who cares.
Comments ?
--
/ / _ _ Didier Verna
http://www.lrde.epita.fr/~didier
- / / - / / /_/ / EPITA / LRDE mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 53 14 59 47
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99