emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize buttons that change user'scustomfileshouldaskforconfirmati


From: Robert J. Chassell
Subject: Re: Customize buttons that change user'scustomfileshouldaskforconfirmation
Date: Mon, 7 Feb 2005 20:22:52 +0000 (UTC)

    It is worse than that - since .emacs was not run Custom can not
    really know where to save and should just say so.  Or, do you mean
    that Custom did overwrite your .emacs?

No, this user has no .emacs file; this .emacs file was created
automatically.

The `custom-set-*' functions were designed to write automatically into
your initialization file, which is .emacs by default.  (You can change
it by setting `user-init-file' to another value.)

When you do not have an initialization file, the functions create a
.emacs file and write into it.

As of today's GNU Emacs CVS snapshot, Mon, 2005 Feb  7  14:18 UTC
GNU Emacs 21.3.50.51 (i686-pc-linux-gnu, GTK+ Version 2.4.14)
a .emacs file can contain either

    (setq next-line-add-newlines t)
or
    (custom-set-variables
     '(next-line-add-newlines t))

The effect is the the same.  

When the initialization file contains two or more variable setting
expressions, the last one takes precedence.

Mostly, people write `setq' statements in their .emacs file to
customize them, although I get the impression that a couple of people
here are depending more on the `custom-set-*' functions.

People are encouraged to write their own `setq' statements for
customization.  Otherwise, there computer will look very mysterious.
Emacs Lisp, at least its simple expressions, has the virtue of being
understandable by just about any one.

But some people use the `custom-set-*' functions since they do not yet
know how to use `setq' or because they do not understand new features,
like faces.

For example, I do not know how to set faces with `setq'.  So I use
`custom-set-faces' in two places in my .emacs file instead.  In one of
them, where I defined `bobs-w3-font-hook', I edited the expression
normally.  (That looks nice.... :)

In the other, where I set the `bold' face and others, I use the
`custom-set-faces' graphic user interface and let it write my .emacs
file automatically.  (The automatic writing produces ugly looking code
... :(

(Obviously, it would be pleasant and useful to fix ugly code
production; but that fix is not as important as others that need
doing.)

Clearly, the phrase "Erase All" should mean "Erase All
Customizations".  This means converting your `setq' and `custom-set-*'
expressions to their default values, deleting your defuns and anything
else in your initialization file.

Worse, since the Emacs provided by the distribution contains default
values, as it must, "Erase All" cannot actually mean erase everything,
but must mean "Reset All to Default Values".

So I do not think the word "Erase" should be part of the function name
or on any menu at all.  `Reset to Default' is much more accurate.
That phrase works both with the encouraged customization in which you
manually edit an initialization file and with customization in which a
value is written automatically into that initialization file.

-- 
    Robert J. Chassell                         
    address@hidden                         GnuPG Key ID: 004B4AC8
    http://www.rattlesnake.com                  http://www.teak.cc




reply via email to

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