Commit e490b289 authored by Chong Yidong's avatar Chong Yidong
Browse files

Document Whitespace mode in manual, plus its use in Diff mode.

* doc/emacs/display.texi (Useless Whitespace): Add Whitespace mode.

* doc/emacs/files.texi (Diff Mode): Discuss use of Whitespace mode.

Fixes: debbugs:10300
parent 9858c69b
2012-01-07 Chong Yidong <cyd@gnu.org>
* display.texi (Useless Whitespace): Add Whitespace mode.
* custom.texi (Hooks): Discuss how to disable minor modes.
* files.texi (Diff Mode): Discuss diff-auto-refine-mode
(Bug#10309).
(Bug#10309). Discuss use of Whitespace mode (Bug#10300).
* trouble.texi (Lossage): Refer to Bugs node for problems.
(DEL Does Not Delete): Don't use "usual erasure key" teminology.
......
......@@ -1062,6 +1062,56 @@ can enable or disable this feature for all new buffers by setting the
default value of this variable, e.g.@: @code{(setq-default
indicate-empty-lines t)}.
@cindex Whitespace mode
@cindex mode, Whitespace
@findex whitespace-mode
@vindex whitespace-style
Whitespace mode is a buffer-local minor mode that lets you
``visualize'' many kinds of whitespace in the buffer, by either
drawing the whitespace characters with a special face or displaying
them as special glyphs. To toggle this mode, type @kbd{M-x
whitespace-mode}. The kinds of whitespace visualized are determined
by the list variable @code{whitespace-style}. Here is a partial list
of possible elements (see the variable's documentation for the full
list):
@table @code
@item face
Enable all visualizations which use special faces. This element has a
special meaing: if it is absent from the list, none of the other
visualizations take effect except @code{space-mark}, @code{tab-mark},
and @code{newline-mark}.
@item trailing
Highlight trailing whitespace.
@item tabs
Highlight tab characters.
@item spaces
Highlight space and non-breaking space characters.
@item lines
@vindex whitespace-line-column
Highlight lines longer than 80 lines. To change the column limit,
customize the variable @code{whitespace-line-column}.
@item newline
Highlight newlines.
@item empty
Highlight empty lines.
@item space-mark
Draw space and non-breaking characters with a special glyph.
@item tab-mark
Draw tab characters with a special glyph.
@item newline-mark
Draw newline characters with a special glyph.
@end table
@node Selective Display
@section Selective Display
@cindex selective display
......
......@@ -1463,13 +1463,14 @@ descriptions of the changes. @kbd{C-x 4 a} itself in Diff mode
operates on behalf of the current hunk's file, but gets the function
name from the patch itself. This is useful for making log entries for
functions that are deleted by the patch.
@item M-x diff-show-trailing-whitespaces RET
@findex diff-show-trailing-whitespaces
Highlight trailing whitespace characters, except for those used by the
patch syntax (@pxref{Useless Whitespace}).
@end table
By default, Diff mode highlights trailing whitespace on modified
lines, so that they are more obvious. This is done by enabling
Whitespace mode in the Diff buffer (@pxref{Useless Whitespace}). Diff
mode buffers are set up so that Whitespace mode avoids highlighting
trailing whitespace occurring in the diff context.
@node Misc File Ops
@section Miscellaneous File Operations
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment