Recardless of whether a feature freeze is the appropriate time to
discuss I propose the following (I fell that if we are
meddling with it to create seperate custom files etc, it is better to
do it correctly now)
1. early-packages is made to depend on the value of init-file-user (I
thought we already agreed to do that).
2. custom-set-variables is changed to set 'last-custom-loaded-from' to
the current load file.
3. In cus-edit
;; NB "init-file-user" independent
(defcustom custom-file (concat "~" user-init-directory
"lisp/options.el")
Furthermore when saving options, cus-edit creates the whole path if
need be.
4. Before any init file loading is done in starup.el
;; This depends on init-file-user through early-package-path
(setq custom-file (or (locate-library "options" nil
early-package-load-path ) custom-file))
(setq custom-default-file custom-file)
5. ".emacs-early" is loaded by
(setq user-early-init-file
(or (locate-library "init-early" nil early-package-load-path)
(concat "~" init-file-user "/" init-user-directoy
"/lisp-init-early.el")))
(load user-early-init-file t t t)
6. load-user-init-file is replaced by (IMHO a lot cleaner than the
current version because it uses built in search mechanisms).
(defun load-user-init-file (init-file-user)
"This function actually reads the users init files."
(when init-file-user
(setq last-custom-load-from nil)
; Prefer ".xemacs/lisp/init.[el[c]]" if there is one
; Fall back to "~/.emacs" other wise.
(setq user-init-file
(or (locate-library "init" nil early-package-load-path)
(concat "~" init-file-user "/.emacs")))
(load user-init-file t t t)
; Load the custom file
(unless inhibit-default-custom
(load custom-file t t t))
;
; Set custom-file to a decent place to save the customizations.
; i.e. if the customizations were in ~/.emacs, they stay there.
; If we were told to put them somewhere explictly we put them
; there.
(when (eq custom-file default-custom-file)
(setq custom-file
(or last-custom-load-from
(get 'custom-file 'standard-value))))
(unless inhibit-default-init
(let ((inhibit-startup-message nil))
;; Users are supposed to be told their rights.
;; (Plus how to get help and how to undo.)
;; Don't you dare turn this off for anyone except yourself.
(load "default" t t)))))
This design ensures (assuming init-file-user = "" and u-i-directory=
".xemacs")
Backwards compatibility (with FSF and 20.4)
a. No ~.xemacs/lisp/init.el => .emacs is used.
b. If customize stuff is in .emacs that gets evalled (of course)
and custom stuff also saved there
Sensible, 'no suprise' defaults
c. ~/.emacs is still the default when init.el is not there.
[do we want that]
d. Customize stuff gets saved to a seperate file (~/xemacs/lisp/options.el).
Easy configuration
e. It would be easy to write a "migrate.el" that can covert
.xemacs-options and .emacs custom settings to
~/xemacs/lisp/options.el and optionially move the rest to
~/xemacs/lisp/init.el.
f. Want to copy somebody elses custom options?
xemacs -u otheruser
Reset custom-file to default value
Save all customizations.
Show replies by date