[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: |
Luc Teirlinck |
Subject: |
Re: Documentation for custom-file - is not (load custom-file) needed? |
Date: |
Sun, 5 Dec 2004 18:24:22 -0600 (CST) |
Richard Stallman wrote:
The doc string for custom-file says "If you specify some other
file, you
need to explicitly load that file for the settings to take
effect". Info
however says "Emacs loads the file right after your `.emacs' if
you did \not
load it already". One of these must be wrong.
I just looked at the code, and the latter is correct.
So my previous doc change is not right. I will fix it.
Unless I am completely missing something, it would appear that, unless
some other (doc or code) fixes are made, problems remains for people
trying to set `custom-file' through Custom, as Lennart pointed out
before.
Present docstring:
(defcustom custom-file nil
"File used for storing customization information.
The default is nil, which means to use your init file
as specified by `user-init-file'.
When you change this variable, look in the previous custom file
\(usually your init file) for the forms `(custom-set-variables ...)'
and `(custom-set-faces ...)', and copy them (whichever ones you find)
to the new custom file. This will preserve your existing customizations."
Problems:
1. Fails to point out that saving this through Custom without taking
additional steps will not work, because Custom will store
`custom-file' in `custom-file' as Lennart pointed out. Emacs will
_not_ load custom-file after .emacs, because `custom-file' will
still be nil.
2. Maybe the docstring should warn the user to use an absolute file
name. (This may not be obvious at all to a beginning user.) Very
confusing things can happen if a relative file name is used when
setting this through Custom with a bad default-directory.
3. The last paragraph fails to point out that if you set `custom-file'
through Custom, Custom will automatically copy your
`custom-set-variables' and `custom-set-faces' forms to
`custom-file'. (But it will not erase them from .emacs or the old
`custom-file'.)
I could propose an alternate docstring, as well as maybe some changes
to `(emacs)Saving Customizations', if we decide to leave the code
unchanged.
Sincerely,
Luc.
Re: Documentation for custom-file - is not (load custom-file) needed?, John Paul Wallington, 2004/12/05