emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug, probably related to Custom Themes.


From: Luc Teirlinck
Subject: Re: Bug, probably related to Custom Themes.
Date: Wed, 21 Dec 2005 16:58:55 -0600 (CST)

   Why do you think it is probably related to Custom Themes?

The documentation of Custom themes in the Emacs manual leaves many
important questions unanswered.

For instance, consider the following.

If somebody puts `(load-theme 'foo)' in their .emacs and the
custom-set-variables form has no setting for option bar and if no
"rogue" setting for bar overrides foo, then bar gets the value
specified by foo.  No problem.

If now the user saves another value for bar in a Custom buffer for
future sessions, then from now on that saved value overrides foo's
value.  No problem.

But the user has some bad experiences with the new value and wants to
get rid of it.  He chooses "Erase Customization" in a Custom buffer.

_Now_ what is supposed to happen?  Do we restore the value set by foo
or the "standard" value that would be in effect if there were no themes?

I have the impression that the purpose of the:

(custom-reset-variables
 '(bar nil))

is to override foo's value and restore the no-themes default.  If this
is really the intent, then not only are there bugs in the
implementation, the intent itself can not possibly be implemented in
a consistent way.  It is not because somebody long ago experimented
with some value for bar and then erased that customization that from
there on forward, any value for bar set by any new theme the user
might ever load in the future should be overridden.

Loading a theme means installing a new set of defaults.  "Erase
Customization" should restore the theme value.  If the user wants the
no-themes default, he should set and save bar in a Custom buffer to
the no-themes default, thereby making the no-theme default the user
theme value which explicitly overrides any theme, present or future.
That is the only way one can be consistent.  It is the only way to
avoid that somebody who does not use any themes whatsoever (other than
the user one) gets his Custom file written full with stuff that not
only makes his Custom file longer and more messy, but that moreover
may override themes he might want to use in the future (whereas he
never _wanted_ to override the value set by these themes).

Sincerely,

Luc.




reply via email to

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