[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: always put Customizations in `custom-file', never in `user-init-file
From: |
Stephen J. Turnbull |
Subject: |
Re: always put Customizations in `custom-file', never in `user-init-file' |
Date: |
Tue, 11 Dec 2007 06:19:22 +0900 |
Lennart Borgman (gmail) writes:
> Drew Adams wrote:
> > I think it was probably a mistake ever to have put Customize customizations
> > into a file intended for editing. That can confuse users, and it's just
> > asking for trouble. Now that we have a good alternative (`custom-file'), I
> > think that should be used exclusively.
> ...
> > WDOT?
Be very careful. In particular, the natural idea of migrating by
loading the init file and using Custom to save its internal state to a
custom-file caused no end of pain to users when it was implemented in
XEmacs. If there is any error in the init file, you can lose all
customizations.
> Great. And I guess custom-file should be run after .emacs, since that
> makes it possible to chose another custom-file.
Experience in XEmacs showed that users often want to use information
in the custom-file in their init files. There were issues (maybe
XEmacs-specific) with initial values for faces, too. After the init
file was run was too late. It's easy enough to load the custom-file
late for those users for whom that matters: don't use the default
name. Something like
(defvar custom-file "custom.el")
(defvar default-custom-file-loaded-p nil)
(progn
(do-emacs-early-initializations)
(when (file-readable-p custom-file)
(load custom-file))
(load user-init-file)
(when (and (not default-custom-file-loaded-p)
(file-readable-p custom-file))
(load custom-file)))
- always put Customizations in `custom-file', never in `user-init-file', Drew Adams, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Eric Hanchrow, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Lennart Borgman (gmail), 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file',
Stephen J. Turnbull <=
- Re: always put Customizations in `custom-file', never in `user-init-file', Lennart Borgman (gmail), 2007/12/10
- RE: always put Customizations in `custom-file', never in `user-init-file', Drew Adams, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Lennart Borgman (gmail), 2007/12/10
- RE: always put Customizations in `custom-file', never in `user-init-file', Drew Adams, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Lennart Borgman (gmail), 2007/12/10
- RE: always put Customizations in `custom-file', never in `user-init-file', Drew Adams, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Jason Rumney, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Lennart Borgman (gmail), 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', Stephen J. Turnbull, 2007/12/10
- Re: always put Customizations in `custom-file', never in `user-init-file', David Kastrup, 2007/12/10