aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-11-09 01:31:53 +0800
committerChong Yidong2012-11-09 01:31:53 +0800
commit9d9e48d9041bf039d873b23484301acca52972e9 (patch)
tree2941ffe59ddf119a004df61e65bef7841dd5549d /doc
parent32170f7ff2f85378cbafd68ea562fc0da7909941 (diff)
downloademacs-9d9e48d9041bf039d873b23484301acca52972e9.tar.gz
emacs-9d9e48d9041bf039d873b23484301acca52972e9.zip
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')
-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 @@
12012-11-08 Chong Yidong <cyd@gnu.org> 12012-11-08 Chong Yidong <cyd@gnu.org>
2 2
3 * files.texi (Diff Mode): Doc fixes for
4 diff-delete-trailing-whitespace (Bug#12831).
5
3 * trouble.texi (Crashing): Copyedits. 6 * trouble.texi (Crashing): Copyedits.
4 7
52012-11-08 Glenn Morris <rgm@gnu.org> 82012-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.
1341 You can edit a Diff mode buffer like any other buffer. (If it is 1341 You can edit a Diff mode buffer like any other buffer. (If it is
1342read-only, you need to make it writable first. @xref{Misc Buffer}.) 1342read-only, you need to make it writable first. @xref{Misc Buffer}.)
1343Whenever you change a hunk, Diff mode attempts to automatically 1343Whenever you change a hunk, Diff mode attempts to automatically
1344correct the line numbers in the hunk headers, to ensure that the diff 1344correct the line numbers in the hunk headers, to ensure that the patch
1345remains ``correct''. To disable automatic line number correction, 1345remains ``correct''. To disable automatic line number correction,
1346change the variable @code{diff-update-on-the-fly} to @code{nil}. 1346change the variable @code{diff-update-on-the-fly} to @code{nil}.
1347 1347
@@ -1472,17 +1472,20 @@ functions that are deleted by the patch.
1472 1472
1473@c Trailing whitespace is NOT shown by default. 1473@c Trailing whitespace is NOT shown by default.
1474@c Emacs's dir-locals file enables this (for some reason). 1474@c Emacs's dir-locals file enables this (for some reason).
1475@cindex trailing whitespace, in diffs 1475@cindex trailing whitespace, in patches
1476@findex diff-remove-trailing-whitespace 1476@findex diff-delete-trailing-whitespace
1477 Diff mode has various features for dealing with trailing whitespace 1477 Patches sometimes include trailing whitespace on modified lines, as
1478on modified lines, since this is often an unintentional and unwanted 1478an unintentional and undesired change. There are two ways to deal
1479change. If you enable Whitespace mode in a Diff buffer, trailing 1479with this problem. Firstly, if you enable Whitespace mode in a Diff
1480whitespace is highlighted (@pxref{Useless Whitespace}). The command 1480buffer (@pxref{Useless Whitespace}), it automatically highlights
1481@kbd{M-x diff-remove-trailing-whitespace} searches for trailing 1481trailing whitespace in modified lines. Secondly, you can use the
1482whitespace in the lines modified or added by a diff. If it finds any, 1482command @kbd{M-x diff-delete-trailing-whitespace}, which searches for
1483it tries to visit the associated file(s) and remove it. It does not 1483trailing whitespace in the lines modified by the patch, and removes
1484save the modifications, rather it lists any buffers that were modified 1484that whitespace in both the patch and the patched source file(s).
1485so you can decide for yourself what to do. 1485This command does not save the modifications that it makes, so you can
1486decide whether to save the changes (the list of modified files is
1487displayed in the echo area). With a prefix argument, it tries to
1488modify the original source files rather than the patched source files.
1486 1489
1487@node Misc File Ops 1490@node Misc File Ops
1488@section Miscellaneous File Operations 1491@section Miscellaneous File Operations