summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-11-09 01:31:53 +0800
committerChong Yidong <cyd@gnu.org>2012-11-09 01:31:53 +0800
commit9d9e48d9041bf039d873b23484301acca52972e9 (patch)
tree2941ffe59ddf119a004df61e65bef7841dd5549d /doc/emacs
parent32170f7ff2f85378cbafd68ea562fc0da7909941 (diff)
downloademacs-9d9e48d9041bf039d873b23484301acca52972e9.tar.gz
Rewrite and rename diff-delete-trailing-whitespace.
* lisp/vc/diff-mode.el (diff-delete-trailing-whitespace): Rewrite, and rename from diff-remove-trailing-whitespace (Bug#12831). * files.texi (Diff Mode): Doc fixes for diff-delete-trailing-whitespace.
Diffstat (limited to 'doc/emacs')
-rw-r--r--doc/emacs/ChangeLog3
-rw-r--r--doc/emacs/files.texi27
2 files changed, 18 insertions, 12 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 14ed58fb5c1..2a58735535f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,8 @@
2012-11-08 Chong Yidong <cyd@gnu.org>
+ * files.texi (Diff Mode): Doc fixes for
+ diff-delete-trailing-whitespace (Bug#12831).
+
* trouble.texi (Crashing): Copyedits.
2012-11-08 Glenn Morris <rgm@gnu.org>
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index e2a85c6d138..8b609891caf 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1341,7 +1341,7 @@ contents of the hunk.
You can edit a Diff mode buffer like any other buffer. (If it is
read-only, you need to make it writable first. @xref{Misc Buffer}.)
Whenever you change a hunk, Diff mode attempts to automatically
-correct the line numbers in the hunk headers, to ensure that the diff
+correct the line numbers in the hunk headers, to ensure that the patch
remains ``correct''. To disable automatic line number correction,
change the variable @code{diff-update-on-the-fly} to @code{nil}.
@@ -1472,17 +1472,20 @@ functions that are deleted by the patch.
@c Trailing whitespace is NOT shown by default.
@c Emacs's dir-locals file enables this (for some reason).
-@cindex trailing whitespace, in diffs
-@findex diff-remove-trailing-whitespace
- Diff mode has various features for dealing with trailing whitespace
-on modified lines, since this is often an unintentional and unwanted
-change. If you enable Whitespace mode in a Diff buffer, trailing
-whitespace is highlighted (@pxref{Useless Whitespace}). The command
-@kbd{M-x diff-remove-trailing-whitespace} searches for trailing
-whitespace in the lines modified or added by a diff. If it finds any,
-it tries to visit the associated file(s) and remove it. It does not
-save the modifications, rather it lists any buffers that were modified
-so you can decide for yourself what to do.
+@cindex trailing whitespace, in patches
+@findex diff-delete-trailing-whitespace
+ Patches sometimes include trailing whitespace on modified lines, as
+an unintentional and undesired change. There are two ways to deal
+with this problem. Firstly, if you enable Whitespace mode in a Diff
+buffer (@pxref{Useless Whitespace}), it automatically highlights
+trailing whitespace in modified lines. Secondly, you can use the
+command @kbd{M-x diff-delete-trailing-whitespace}, which searches for
+trailing whitespace in the lines modified by the patch, and removes
+that whitespace in both the patch and the patched source file(s).
+This command does not save the modifications that it makes, so you can
+decide whether to save the changes (the list of modified files is
+displayed in the echo area). With a prefix argument, it tries to
+modify the original source files rather than the patched source files.
@node Misc File Ops
@section Miscellaneous File Operations