* bad interaction of face-spec-set and customize-face
@ 2008-03-01 22:25 Glenn Morris
2008-03-02 17:25 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2008-03-01 22:25 UTC (permalink / raw)
To: emacs-devel
emacs -Q
M-x customize-face font-lock-comment-face
Change foreground to blue
"Set for current session"
-> face changes to blue
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bad interaction of face-spec-set and customize-face
2008-03-01 22:25 bad interaction of face-spec-set and customize-face Glenn Morris
@ 2008-03-02 17:25 ` Richard Stallman
2008-03-03 9:11 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2008-03-02 17:25 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bad interaction of face-spec-set and customize-face
2008-03-02 17:25 ` Richard Stallman
@ 2008-03-03 9:11 ` Glenn Morris
0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2008-03-03 9:11 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Richard Stallman wrote:
> 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.
It seems odd to me, but I haven't thought about it and don't really
want to.
It does as you say need more work (and documenting); eg at the moment,
customize happily tells you "Set for current session" despite the fact
that no change has been applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-03 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-01 22:25 bad interaction of face-spec-set and customize-face Glenn Morris
2008-03-02 17:25 ` Richard Stallman
2008-03-03 9:11 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.