[OS X Emacs] fit-frame resizes frames too large in Aquamacs

David Reitter david.reitter at gmail.com
Wed Oct 21 18:59:59 EDT 2009

On Oct 21, 2009, at 6:32 PM, <siemsen at ucar.edu> <siemsen at ucar.edu>  
> It didn't work.  It doesn't set the value used by fit-frame.   
> Instead, it seems to set the height of the font of the current  
> frame, not of the height of the default face.
> Am I in the right ballpark?

Yes you are.  Emacs calculates dimensions and coordinates based on the  
frame font because you're setting the "frame size".  You can change  
the fit-frame function to be smarter - it should be pretty easy.   
Convert to pixels based on the default face, then convert back to  
frame chars.
But even so: the "width" of the default face is just an approximation,  
because the default face may well be a variable-width font.

If you do improve fit-frame, please post the new code.  (You can check  
if Drew Adams has an updated version.)

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!

More information about the MacOSX-Emacs mailing list