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. Titus