[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bad interaction of face-spec-set and customize-face
From: |
Richard Stallman |
Subject: |
Re: bad interaction of face-spec-set and customize-face |
Date: |
Sun, 02 Mar 2008 12:25:25 -0500 |
emacs -Q
(face-spec-set 'font-lock-comment-face
'((t (:foreground "OrangeRed"))))
M-x customize-face font-lock-comment-face
Change foreground to blue
"Set for current session"
-> face does not change
This is not a bug.
A few months ago I made an effort to clean up the relationship between
face atttributes and customization.
Whatever you set with customization acts like a change
to the defface.
Attribute values that you set with face-spec-set (with FOR-DEFFACE =
nil) take precedence over the defface (and over customization).
The idea is that programs should set attributes with face-spec-set,
while users should set them with Custom (or with face-spec-set specifying
FOR-DEFFACE = t).
So this is not a bug, but it could be useful for the Set operation in
Custom to warn you that the face has an override which may cause your
changes not to be visible. It could also have an operation to get rid
of that offerride by doing (face-spec-set FACE nil).
I did not finish rationalizing this whole area. In particular, it is
not clear how `set-face-attribute' should interact with
`face-spec-set' and with Custom. This needs more thinking.