Improve documentatuon of 'truncate-partial-width-windows'

* src/xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>:
Clarify in the doc string how the width of partial-width windows
is computed for the purposes of truncation decision.  (Bug#4338)

* doc/emacs/windows.texi (Split Window): Clarify how the width of
windows is calculated for the purposes of truncation decision.
* doc/emacs/display.texi (Line Truncation): Remove a redundant
index entry.
This commit is contained in:
Eli Zaretskii 2016-03-26 10:17:12 +03:00
parent fb9a62c9c4
commit 8ee4c52abc
3 changed files with 13 additions and 7 deletions

View file

@ -1601,7 +1601,6 @@ screen lines. Setting the variable @code{truncate-lines} in any way
makes it local to the current buffer; until that time, the default makes it local to the current buffer; until that time, the default
value, which is normally @code{nil}, is in effect. value, which is normally @code{nil}, is in effect.
@vindex truncate-partial-width-windows
If a split window becomes too narrow, Emacs may automatically enable If a split window becomes too narrow, Emacs may automatically enable
line truncation. @xref{Split Window}, for the variable line truncation. @xref{Split Window}, for the variable
@code{truncate-partial-width-windows} which controls this. @code{truncate-partial-width-windows} which controls this.

View file

@ -117,10 +117,14 @@ variable @code{truncate-lines} (@pxref{Line Truncation}); it is
instead controlled by the variable instead controlled by the variable
@code{truncate-partial-width-windows}. If the value of this variable @code{truncate-partial-width-windows}. If the value of this variable
is a positive integer (the default is 50), that specifies the minimum is a positive integer (the default is 50), that specifies the minimum
width for a partial-width window before automatic line truncation total width for a partial-width window before automatic line
occurs; if the value is @code{nil}, automatic line truncation is truncation occurs; if the value is @code{nil}, automatic line
disabled; and for any other non-@code{nil} value, Emacs truncates truncation is disabled; and for any other non-@code{nil} value, Emacs
lines in every partial-width window regardless of its width. truncates lines in every partial-width window regardless of its width.
The total width of a window is in column units as reported by
@code{window-total-width} (@pxref{Window Sizes,,, elisp, The Emacs
Lisp Reference Manual}), it includes the fringes, the continuation and
truncation glyphs, the margins, and the scroll bar.
On text terminals, side-by-side windows are separated by a vertical On text terminals, side-by-side windows are separated by a vertical
divider which is drawn using the @code{vertical-border} face. divider which is drawn using the @code{vertical-border} face.

View file

@ -31422,8 +31422,11 @@ Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
Vtruncate_partial_width_windows, Vtruncate_partial_width_windows,
doc: /* Non-nil means truncate lines in windows narrower than the frame. doc: /* Non-nil means truncate lines in windows narrower than the frame.
For an integer value, truncate lines in each window narrower than the For an integer value, truncate lines in each window narrower than the
full frame width, provided the window width is less than that integer; full frame width, provided the total window width in column units is less
otherwise, respect the value of `truncate-lines'. than that integer; otherwise, respect the value of `truncate-lines'.
The total width of the window is as returned by `window-total-width', it
includes the fringes, the continuation and truncation glyphs, the
display margins (if any), and the scroll bar
For any other non-nil value, truncate lines in all windows that do For any other non-nil value, truncate lines in all windows that do
not span the full frame width. not span the full frame width.