[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
creating new frame doesn't get faces right
From: |
John Paul Wallington |
Subject: |
creating new frame doesn't get faces right |
Date: |
Fri, 23 May 2003 19:12:23 +0100 |
emacs -q --no-site-file & (running under X)
eval the following two forms in the scratch buffer:
(defface test-face
'((((class color)
(background dark))
(:bold t))
(((class color)
(background light))
(:bold t))
(t
()))
"Test face.")
(insert (propertize "Foo!" 'face 'test-face))
then do: C-x 5 2
The second frame has the same buffer contents,
but the Foo! isn't bold.
This can be "fixed" by restoring the `face-set-after-frame-default'
call in `x-create-frame-with-faces'. But then it gets called twice,
which isn't good.
Instead, changing `face-set-after-frame-default' to call
`frame-set-background-mode' (below) seems a better fix, but still
seems clunky/expensive.
(defun face-set-after-frame-default (frame)
"Set frame-local faces of FRAME from face specs and resources.
Initialize colors of certain faces from frame parameters."
+ (frame-set-background-mode frame)
(if (face-attribute 'default :font t)
(set-face-attribute 'default frame :font
(face-attribute 'default :font t))
I haven't worked hard on the right fix. I will be short of free time
this weekend, and thought it better to post this report.
In GNU Emacs 21.3.50.2 (powerpc-unknown-linux-gnu, X toolkit)
of 2003-05-22 on indigo
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
locale-coding-system: nil
default-enable-multibyte-characters: t
- creating new frame doesn't get faces right,
John Paul Wallington <=