any way makes it local to the current buffer; until that time, the
default value, which is normally @code{nil}, is in effect.
+ Since line truncation and word wrap (described in the next section)
+are contradictory, @code{toggle-truncate-lines} disables word wrap
+when it turns on line truncation.
+
If a split window becomes too narrow, Emacs may automatically enable
line truncation. @xref{Split Window}, for the variable
@code{truncate-partial-width-windows} which controls this.
mode display. The command @kbd{M-x global-visual-line-mode} toggles
Visual Line mode in all buffers.
+ Since word wrap and line truncation (described in the previous
+section) are contradictory, turning on @code{visual-line-mode}
+disables line truncation.
+
@findex beginning-of-visual-line
@findex end-of-visual-line
@findex next-logical-line
wraps. (The display table can specify alternate characters to use
for this; @pxref{Display Tables}).
+ Since wrapping and truncation of text contradict each other, Emacs
+turns off line truncation when wrapping is requested, and vice versa.
+
@defopt truncate-lines
If this buffer-local variable is non-@code{nil}, lines that extend
beyond the right edge of the window are truncated; otherwise, they are
When Visual Line mode is enabled, `word-wrap' is turned on in
this buffer, and simple editing commands are redefined to act on
visual lines, not logical lines. See Info node `Visual Line
-Mode' for details."
+Mode' for details.
+Turning on this mode disables line truncation set up by
+variables `truncate-lines' and `truncate-partial-width-windows'."
:keymap visual-line-mode-map
:group 'visual-line
:lighter " Wrap"
`truncate-partial-width-windows' if that variable is non-nil
and this buffer is not full-frame width.
-Minibuffers set this variable to nil. */);
+Minibuffers set this variable to nil.
+
+Don't set this to a non-nil value when `visual-line-mode' is
+turned on, as it could produce confusing results. */);
DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil,
doc: /* Non-nil means to use word-wrapping for continuation lines.
A value of nil means to respect the value of `truncate-lines'.
-If `word-wrap' is enabled, you might want to reduce this. */);
+If `word-wrap' is enabled, you might want to reduce the value of this.
+
+Don't set this to a non-nil value when `visual-line-mode' is
+turned on, as it could produce confusing results. */);
Vtruncate_partial_width_windows = make_fixnum (50);
DEFVAR_BOOL("word-wrap-by-category", word_wrap_by_category, doc: /*