[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110813: Document diff-remove-trai
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110813: Document diff-remove-trailing-whitespace |
Date: |
Thu, 08 Nov 2012 00:14:23 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110813
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Thu 2012-11-08 00:14:23 -0800
message:
Document diff-remove-trailing-whitespace
* doc/emacs/files.texi (Diff Mode): Trailing whitespace updates.
* lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Doc fix.
* etc/NEWS: Related markup.
modified:
doc/emacs/ChangeLog
doc/emacs/files.texi
etc/NEWS
lisp/ChangeLog
lisp/vc/diff-mode.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2012-11-07 21:04:52 +0000
+++ b/doc/emacs/ChangeLog 2012-11-08 08:14:23 +0000
@@ -1,3 +1,7 @@
+2012-11-08 Glenn Morris <address@hidden>
+
+ * files.texi (Diff Mode): Trailing whitespace updates.
+
2012-11-07 Chong Yidong <address@hidden>
* misc.texi (Terminal emulator): Document Term mode faces.
=== modified file 'doc/emacs/files.texi'
--- a/doc/emacs/files.texi 2012-10-27 05:03:52 +0000
+++ b/doc/emacs/files.texi 2012-11-08 08:14:23 +0000
@@ -1470,11 +1470,19 @@
functions that are deleted by the patch.
@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.
address@hidden Trailing whitespace is NOT shown by default.
address@hidden Emacs's dir-locals file enables this (for some reason).
address@hidden trailing whitespace, in diffs
address@hidden 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
address@hidden 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.
@node Misc File Ops
@section Miscellaneous File Operations
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-11-07 22:27:39 +0000
+++ b/etc/NEWS 2012-11-08 08:14:23 +0000
@@ -392,18 +392,21 @@
** Diff mode
+---
*** Changes are now highlighted using the same color scheme as in
modern VCSes. Deletions are displayed in red (new faces
-`diff-refine-removed' and `smerge-refined-removed' and new definition
+`diff-refine-removed' and `smerge-refined-removed', and new definition
of `diff-removed'), insertions in green (new faces `diff-refine-added'
-and `smerge-refined-added' and new definition of `diff-added').
+and `smerge-refined-added', and new definition of `diff-added').
+---
*** The variable `diff-use-changed-face' defines whether to use the
face `diff-changed', or `diff-removed' and `diff-added' to highlight
changes in context diffs.
-*** The new command `diff-remove-trailing-whitespace' fixes trailing
-whitespace problems introduced by the diff.
++++
+*** The new command `diff-remove-trailing-whitespace' removes trailing
+whitespace introduced by a diff.
** Dired
+++
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-08 01:24:14 +0000
+++ b/lisp/ChangeLog 2012-11-08 08:14:23 +0000
@@ -1,3 +1,7 @@
+2012-11-08 Glenn Morris <address@hidden>
+
+ * vc/diff-mode.el (diff-remove-trailing-whitespace): Doc fix.
+
2012-11-08 Stefan Monnier <address@hidden>
* emacs-lisp/gv.el (gv-define-simple-setter): Fix last change
=== modified file 'lisp/vc/diff-mode.el'
--- a/lisp/vc/diff-mode.el 2012-10-29 15:14:10 +0000
+++ b/lisp/vc/diff-mode.el 2012-11-08 08:14:23 +0000
@@ -2049,12 +2049,12 @@
(error nil))))
(defun diff-remove-trailing-whitespace ()
- "When on a buffer that contains a diff, inspects the
-differences and removes trailing whitespace (spaces, tabs) from
-the lines modified or introduced by this diff. Shows a message
-with the name of the altered buffers, which are unsaved. If a
-file referenced on the diff has no buffer and needs to be fixed,
-a buffer visiting that file is created."
+ "Remove trailing whitespace from the lines modified/added by a diff.
+Called from a buffer containing a diff, this searches for trailing
+whitespace (spaces, tabs) in the modified/added lines. If the
+file that such a line refers to can be found, it visits it and
+removes the associated whitespace, if it is present. It does not
+save any changed buffers, it just gives a message naming them."
(interactive)
;; We assume that the diff header has no trailing whitespace.
(let ((modified-buffers nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110813: Document diff-remove-trailing-whitespace,
Glenn Morris <=