diff options
| author | Chong Yidong | 2012-11-09 01:31:53 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-09 01:31:53 +0800 |
| commit | 9d9e48d9041bf039d873b23484301acca52972e9 (patch) | |
| tree | 2941ffe59ddf119a004df61e65bef7841dd5549d /doc | |
| parent | 32170f7ff2f85378cbafd68ea562fc0da7909941 (diff) | |
| download | emacs-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/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 27 |
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 @@ | |||
| 1 | 2012-11-08 Chong Yidong <cyd@gnu.org> | 1 | 2012-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 | ||
| 5 | 2012-11-08 Glenn Morris <rgm@gnu.org> | 8 | 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. | |||
| 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 |
| 1342 | read-only, you need to make it writable first. @xref{Misc Buffer}.) | 1342 | read-only, you need to make it writable first. @xref{Misc Buffer}.) |
| 1343 | Whenever you change a hunk, Diff mode attempts to automatically | 1343 | Whenever you change a hunk, Diff mode attempts to automatically |
| 1344 | correct the line numbers in the hunk headers, to ensure that the diff | 1344 | correct the line numbers in the hunk headers, to ensure that the patch |
| 1345 | remains ``correct''. To disable automatic line number correction, | 1345 | remains ``correct''. To disable automatic line number correction, |
| 1346 | change the variable @code{diff-update-on-the-fly} to @code{nil}. | 1346 | change 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 |
| 1478 | on modified lines, since this is often an unintentional and unwanted | 1478 | an unintentional and undesired change. There are two ways to deal |
| 1479 | change. If you enable Whitespace mode in a Diff buffer, trailing | 1479 | with this problem. Firstly, if you enable Whitespace mode in a Diff |
| 1480 | whitespace is highlighted (@pxref{Useless Whitespace}). The command | 1480 | buffer (@pxref{Useless Whitespace}), it automatically highlights |
| 1481 | @kbd{M-x diff-remove-trailing-whitespace} searches for trailing | 1481 | trailing whitespace in modified lines. Secondly, you can use the |
| 1482 | whitespace in the lines modified or added by a diff. If it finds any, | 1482 | command @kbd{M-x diff-delete-trailing-whitespace}, which searches for |
| 1483 | it tries to visit the associated file(s) and remove it. It does not | 1483 | trailing whitespace in the lines modified by the patch, and removes |
| 1484 | save the modifications, rather it lists any buffers that were modified | 1484 | that whitespace in both the patch and the patched source file(s). |
| 1485 | so you can decide for yourself what to do. | 1485 | This command does not save the modifications that it makes, so you can |
| 1486 | decide whether to save the changes (the list of modified files is | ||
| 1487 | displayed in the echo area). With a prefix argument, it tries to | ||
| 1488 | modify 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 |