[Top][All Lists]

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

bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width

From: Titus von der Malsburg
Subject: bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width
Date: Sat, 20 Dec 2014 16:21:57 +0100

On 2014-12-20 Sat 16:06, martin rudalics wrote:
>  > (defun default-font-width ()
>  >    "Return the width in pixels of the current buffer's default face font.
> I profoundly dislike the "default-" prefix here.  `buffer-font-height'
> and `buffer-font-width' would be much better IMHO.

The thing is that the value is not fully determined by the buffer, so I
think the name buffer-font-width is a little
misleading.  `frame-buffer-font-width' is more precise but also a little
unwieldy.  The other problem is that `default-font-height' is already a
standard Emacs function and renaming it will cause problems.

>  > I also added the bonus feature which lets you specify a specific face
>  > that should be used for the calculations.
> So are you now sure that we don't need a specific character ("M") any
> more?

If I understand correctly, the returned value is based on the width of a
space.  In proportional fonts that will of course differ from the width
of other characters.  But I think this is not a big problem because the
notion of characters per line doesn't make sense for proportional fonts
and using proportional fonts in Emacs is a terrible idea
anyway.  But perhaps this issue should be mentioned in the doc string.


Attachment: signature.asc
Description: PGP signature

reply via email to

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