[Top][All Lists]

[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: Fri, 23 Dec 2005 17:18:51 -0600 (CST)

Richard Stallman wrote:

   Yidong, could you fix this?  Erase Customization should remove the
   `user' customization, and doing that consistently would put the theme
   value back into effect.

That treats a symptom instead of the _real_ underlying bug.  I have
already given one more example of a "surface bug" that is caused by
the same underlying bug: if a setting is set by a theme, the "Erase
Customization" item of the State Menu is enabled, whereas it should
not be, because it is not going to have any effect (which is confusing
to the user, because the State message says and keeps saying:
"SAVED and set").

That second surface bug is still very closely realted to the original
one.  I will now describe a third surface bug that is, at first view,
completely unrelated.

I load a theme file containing:

 '(column-number-mode t)

Then I disable column-number-mode via the Options menu in the menu bar
and then save my options _using the "Save Options" menu bar item_.
column-number-mode is disabled for the current session, but if I start
a new session column-number-mode is enabled again even though I saved
my customization to disable it.

What happens is that, since I just set column-number-mode to its
standard-value, Custom thought that it just had to erase a line in my
custom-set-variables form (that was not there).  Instead, Custom should
have written a line in my custom-set-variables form explicitly setting
column-number-mode to nil, to override my theme.

The above describes two more bugs in addition to the original one.
What is really going on here?  We agreed that we should treat Theme
values as alternative default values.  It is the only way to get
consistent behavior.  But we tell Custom that the Theme value is a
user customization and that the default value is the no-themes
default, by storing the theme value in saved-value instead of
standard-value.  Obviously whenever Custom checks the value of
standard-value, a bug is likely to result.  I listed three bugs of
this type.  I am pretty sure that you can find a fourth and a fifth
and so on, just by grepping for customized-value in the Emacs source code.



reply via email to

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