[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Faces applies to new frames
From: |
Chong Yidong |
Subject: |
Re: Faces applies to new frames |
Date: |
Sat, 28 Jun 2008 19:42:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> The attached patch does this. It also removes the `font-parameter'
>> frame parameter, which is used to override the default face (a similar
>> patch will be needed for w32fns.c). I think this is bogus.
>
> I'm not sure I understand what your patch does (as mentioned already,
> I think the current setup's interactions are too numerous and I don't
> know them all, so I can't predict the effect of any particular change).
When set-face-attribute changes the default for new frames, what it does
is to change the face vector for the `default' face entry in
face-new-frame-defaults. When you create a new frame, the frame
parameter for that frame is whatever was specified using X resources or
the command line. If you've changed face-new-frame-defaults in the
meantime, you get a mismatch between the two fonts. What then happens
is that in the last step of face-new-frame-defaults, the frame parameter
inadvertently gets applied to the default face, wiping out the effects
of face-new-frame-defaults.
>> + ;; The face specs may specify a different default font. Save this
>> + ;; in the `font' frame parameter.
>> + (setq default-font (face-font 'default))
>> + (when default-font
>> + (set-frame-parameter frame 'font default-font))
>
> But doesn't that mean that (make-frame '((font . "foo-bar"))) will
> disregard the explicit request for "foo-bar"?
True. I think that in this case, x-create-frame-with-faces should take
note that it is passed a `font' frame parameter, and tell
face-set-after-frame-default to stick to that instead of imposing
whatever the `default' face says.
- Re: Faces applies to new frames, (continued)
Re: Faces applies to new frames, Robert J. Chassell, 2008/06/27
Re: Faces applies to new frames, Robert J. Chassell, 2008/06/27
Re: Faces applies to new frames, Chong Yidong, 2008/06/28
- Re: Faces applies to new frames, Stefan Monnier, 2008/06/28
- Re: Faces applies to new frames,
Chong Yidong <=
- Re: Faces applies to new frames, Stefan Monnier, 2008/06/28
- Re: Faces applies to new frames, Miles Bader, 2008/06/28
- Re: Faces applies to new frames, Stefan Monnier, 2008/06/29
- Re: Faces applies to new frames, Miles Bader, 2008/06/29
- Re: Faces applies to new frames, Chong Yidong, 2008/06/29
- Re: Faces applies to new frames, David Kastrup, 2008/06/29
Re: Faces applies to new frames, Stefan Monnier, 2008/06/29
Re: Faces applies to new frames, Richard M Stallman, 2008/06/29
Re: Faces applies to new frames, Chong Yidong, 2008/06/29
Re: Faces applies to new frames, Richard M Stallman, 2008/06/30