[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14233: 24.3; Don't constrain frame size to character multiples

From: Drew Adams
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Sun, 28 Apr 2013 09:29:43 -0700

> 1. `set-frame-font' apparently has this side effect, which is 
> not appropriate here:
>   Also, if FRAME is non-nil,
>   alter the user's Customization settings as though the
>   font-related attributes of the `default' face had been "set in
>   this session", so that the font is applied to future frames.
> (It should say FRAMES, not FRAME, BTW.)
> Why does `set-frame-font' not allow you to change the font 
> for a given frame (besides the selected frame), without also
> changing face `default' for future frames?

Actually, I don't think I see this behavior, or perhaps I misunderstand what is
meant by that text.

After changing the font (e.g. to a different size) using a list of only the
current frame as parameter FRAMES, the changed face `default' does not seem to
affect new frames.

Tracing `set-frame-font' in the debugger, I do see that face `default' gets its
font attributes updated, including the size.  But new frames created after doing
this still seem to use the original `default' size.


emacs -Q
(frame-parameter nil 'font) ; =>
"-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1"

M-x customize-face-other-window default RET
Shows the height as 98 and the State as STANDARD.

  "-outline-Courier New-normal-normal-normal-mono-9-*-*-*-c-*-iso8859-1"
  (list (selected-frame)))

(face-font 'default) ; Shows exactly that font with size `9'.

M-x customize-face-other-window default RET
Shows the height as 69 and the State as STANDARD.

So far, `set-frame-font' seems to do what its doc string says wrt face `default'
- a misfeature, perhaps, but so be it.  Except for one thing: Customize says the
State is "STANDARD" instead of "SET for current session only.", which is what
the doc string specifies. 

But the real difference I see is that `C-x 5 f foo' creates a new frame with
font size 13 again.  And `M-x customize-face-other-window default RET' in that
frame shows the height as 98 again (and the State still as STANDARD).  (And of
course this value of 98 is now seen in the Customize window on the other frame
as well.)

So it does not seem to me like the documented behavior actually occurs.  It does
so partially (the height value is shown changed in the same frame), but not wrt
new frames created.

What am I missing here?

Again, the documented behavior of affecting new frames seems like a misfeature
to me, so I'm not complaining that it does not work as advertised.  I'm just
saying that it does not seem to work as advertised, and I'm asking what I'm

(This is all outside the discussion about `modify-frame-parameters'.  I mention
it because you drew my attention to `set-frame-font'.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]