diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-12-03 18:26:39 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-12-03 18:26:39 +0200 |
commit | e011b22d208f8a2b163721bd2d009b792eb7032c (patch) | |
tree | 24a642c3beccd3b37b63a3ed8aa421d63f73f3d5 /doc | |
parent | 1e1aabbc0931b96d6749839c0d25a23377e3a45b (diff) | |
download | emacs-e011b22d208f8a2b163721bd2d009b792eb7032c.tar.gz |
Document 'window-max-chars-per-line'
* doc/lispref/windows.texi (Window Sizes): Document
'window-max-chars-per-line'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/windows.texi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index ead2f7a52f6..5c7947eeca6 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -635,6 +635,22 @@ Functions for retrieving the height and/or width of window dividers (@pxref{Scroll Bars}), and display margins (@pxref{Display Margins}) are described in the corresponding sections. +If your Lisp program needs to make layout decisions, you will find the +following function useful: + +@defun window-max-chars-per-line &optional window face +This function returns the number of characters displayed in the +specified @var{face} in the specified @var{window} (which must be a +live window). If @var{face} was remapped (@pxref{Face Remapping}), +the information is returned for the remapped face. If omitted or +@code{nil}, @var{face} defaults to the default face, and @var{window} +defaults to the selected window. Unlike @code{window-body-width}, +this function accounts for the actual size of the @var{face}'s font, +instead of working in units of frame's canonical character width. It +also accounts for space used by the continuation glyph, if +@var{window} lacks one or both of its fringes. +@end defun + @cindex fixed-size window @vindex window-min-height @vindex window-min-width |