[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: Stefan Monnier
Subject: Re: Documentation for custom-file - is not (load custom-file) needed?
Date: Fri, 10 Dec 2004 12:05:02 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

W.r.t removing custom-file: some users may set custom-file in their .emacs
and expect it to do something, so we may as well keep it.

>> 2. `custom-set-variables' (a function call with saved customized
>> values in its argument which is stored in one of the user init files)
>> will record the names of the files where it was loaded from, when it
>> is called during loading.  It will read the value of the variable
>> `load-file-name' during its loading.

> Agree, but: As I pointed out earlier I think that if an eval is beeing done
> then (buffer-file-name) should be used instead. This gives the same file
> name as load-file-name would have given during load. The reason is that I
> think this makes it easier to change "custom file".

I'd rather not try to be too clever.
After all, when moving the custom file, you need to tell future Emacsen
where it'll be, so you need to change your .emacs to either
(setq custom-file "newfile") or (load "newfile").  Just M-C-x won't cut it.

I suggest we do this slowly and progressively.  E.g. we can start by making
custom-file a defvar (the current defcustom is just misleading since you
can't really customize it meaningfully).  Then we can introduce the
custom-files thingy that uses load-file-name to keep track of where things
are saved.  This would at first only be used to detect strange situations
and warn the user about it.  After that, we can start thinking again what it
is exactly that we want and how to get it.


reply via email to

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