[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for custom-file - is not (load custom-file) needed?

From: Juri Linkov
Subject: Re: Documentation for custom-file - is not (load custom-file) needed?
Date: Mon, 13 Dec 2004 11:01:12 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Luc Teirlinck <address@hidden> writes:
> One solution might be to tell the user who customizes in .emacs and
> for some reason needs to load the file in .emacs instead of after
> it, to do:
> (setq custom-file "~/emacs/lisp/custom-21.4.el")
> (load custom-file)

There are situations where this is meaningless.  For example,
the user might have a file, only small part of which is the
`custom-set-variables' list:

    (setq custom-file "~/emacs/lisp/.emacs-21.4.el")

    (add-to-list 'load-path "~/emacs/lisp/")
    (load ".emacs-21.4.el")

For the user there are two separate issues here: setting the file name
where customize will save customized variables, and loading a file
with user settings (i.e. an init file like ~/.emacs, but in another

`(load custom-file)' would not make sense here.  Moreover, when the user
will change the value of (setq custom-file ...) the file with other
settings will not be loaded anymore.

There should be a reliable way to detect if the file with
`custom-set-variables' was really loaded, and not to load it twice.
With `custom-files' set inside `custom-set-variables' to `load-file-name'
this is easy: (member custom-file custom-files) means it was loaded.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]