[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-M-x on defface doesn't always work
From: |
Richard Stallman |
Subject: |
Re: C-M-x on defface doesn't always work |
Date: |
Sun, 19 Jun 2005 23:50:06 -0400 |
I think a good solution here is to reset `saved-face' property to nil
before evaluating the defface form, and to restore its original value
afterwards.
Why restore it afterwards? What result is that meant to have?
Now in a new frame this face appears as merged with customized non-saved
background and saved foreground.
I don't think that is correct.
When you evaluate a defcustom with C-M-x, it gets rid of the user's
customizations and installs the default value. Likewise, evaluating a
defface with C-M-x should install the default value and discard the
user's customizations.
(defsubst face-user-default-spec (face)
"Return the user's customized face-spec for FACE, or the default if none.
If there is neither a user setting nor a default for FACE, return nil."
- (or (get face 'saved-face)
+ (or (get face 'customized-face)
+ (get face 'saved-face)
(face-default-spec face)))
What's the motive for that change?