When a line of text extends beyond the right edge of a window, Emacs can continue the line (make it “wrap” to the next screen line), or truncate the line (limit it to one screen line). The additional screen lines used to display a long text line are called continuation lines. Continuation is not the same as filling; continuation happens on the screen only, not in the buffer contents, and it breaks a line precisely at the right margin, not at a word boundary. See Filling.
On a graphical display, tiny arrow images in the window fringes indicate truncated and continued lines (see Fringes). On a text terminal, a ‘$’ in the rightmost column of the window indicates truncation; a ‘\’ on the rightmost column indicates a line that “wraps.” (The display table can specify alternate characters to use for this; see Display Tables).
If this buffer-local variable is non-
nil, lines that extend beyond the right edge of the window are truncated; otherwise, they are continued. As a special exception, the variabletruncate-partial-width-windowstakes precedence in partial-width windows (i.e., windows that do not occupy the entire frame width).
This variable controls line truncation in partial-width windows. A partial-width window is one that does not occupy the entire frame width (see Splitting Windows). If the value is
nil, line truncation is determined by the variabletruncate-lines(see above). If the value is an integer n, lines are truncated if the partial-width window has fewer than n columns, regardless of the value oftruncate-lines; if the partial-width window has n or more columns, line truncation is determined bytruncate-lines. For any other non-nilvalue, lines are truncated in every partial-width window, regardless of the value oftruncate-lines.
When horizontal scrolling (see Horizontal Scrolling) is in use in a window, that forces truncation.
If this buffer-local variable is non-
nil, it defines a “prefix” that is prepended to every continuation line at display-time. (If lines are truncated, the wrap-prefix is never used.) It may be a string, an image, or a stretch-glyph; the value is interpreted in the same way as adisplaytext property. See Display Property.A wrap-prefix may also be specified for regions of text, using the
wrap-prefixtext or overlay property. This takes precedence over thewrap-prefixvariable. See Special Properties.
If this buffer-local variable is non-
nil, it defines a “prefix” that is prepended to every non-continuation line at display-time. It may be a string, an image, or a stretch-glyph; the value is interpreted in the same way as adisplaytext property. See Display Property.A line-prefix may also be specified for regions of text using the
line-prefixtext or overlay property. This takes precedence over theline-prefixvariable. See Special Properties.
If your buffer contains very long lines, and you use
continuation to display them, computing the continuation lines can
make Emacs redisplay slow. The column computation and indentation
functions also become slow. Then you might find it advisable to set
cache-long-line-scans to t.
If this variable is non-
nil, various indentation and motion functions, and Emacs redisplay, cache the results of scanning the buffer, and consult the cache to avoid rescanning regions of the buffer unless they are modified.Turning on the cache slows down processing of short lines somewhat.
This variable is automatically buffer-local in every buffer.