emacs-devel
[Top][All Lists]
Advanced

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

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


From: Luc Teirlinck
Subject: Re: Documentation for custom-file - is not (load custom-file) needed?
Date: Wed, 15 Dec 2004 18:48:02 -0600 (CST)

Richard Stallman wrote:

   initsplit may need to be changed to cope with the new behavior of
   Emacs.  That is normal: something that overrides part of Emacs
   probably will need to be changed when that part of Emacs changes.

All initsplit has to do is:

(unless custom-file (setq custom-file user-initfile))

(If I understood correctly, setting `custom-file' non-nil will
ensure this is the file that is going to be written into.)

However, somebody who upgrades Emacs to 21.4 will usually not upgrade
initsplit at the same time.  Such a person is in for some surprise.
All he has to do is `(setq custom-file "~/.emacs")', except that the
user will not be aware of anything.  (Unless he was able to find it
buried in NEWS, which has grown huge, and understood the implications
for initsplit.)

It looks like I am not going to be able to convince you that this is a
very bad idea.  However, I hope that, if `custom-file' is not set, you
are at least going to _ask_ the user before writing into any file he
did not ask you to write into.  Some people got very upset about Emacs
adding a final newline behind their backs.  Clobbering
`custom-set-variables' forms behind the user's back would be
substantially worse.

By the way, what do you plan to do if Emacs is started with `emacs -q'?

       The user may load several files with `custom-set-variables' forms to
       add a set of customizations to his .emacs.  Then he just nominally
       saves some option using Custom to make Custom write all the stuff into
       .emacs.  So you save everything in the last file he loaded.

   What Emacs would do at present is write all of them into .emacs, which
   is probably also not what he wants.

But that is why he loaded them.

Sincerely,

Luc.





reply via email to

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