]> git.eshelyaron.com Git - emacs.git/commitdiff
New function diff-show-trailing-blanks in diff-mode.el.
authorVinicius Jose Latorre <viniciusjl@ig.com.br>
Fri, 25 Jul 2008 02:34:31 +0000 (02:34 +0000)
committerVinicius Jose Latorre <viniciusjl@ig.com.br>
Fri, 25 Jul 2008 02:34:31 +0000 (02:34 +0000)
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/diff-mode.el

index a16d47d0e454ae4cd27a49be4283d69475942fec..4013ca88dc4fc92bdfceb614790260ac1a4300a5 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-24  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
+
+       * NEWS: New function `diff-show-trailing-blanks' in diff-mode.el.
+
 2008-07-24  Michael Albinus  <michael.albinus@gmx.de>
 
        * NEWS: Add xesam.el.
index 1d06e827dfa9eca209308c574af7617bb849195a..2b98ac46cb2a216e97c869c52c0cbd62ff9067b5 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -516,6 +516,9 @@ which have installed this software.
 \f
 * Changes in Specialized Modes and Packages in Emacs 23.1
 
+** Diff mode
+*** New function `diff-show-trailing-blanks'.
+
 ** Abbrev has been rewritten in Elisp and extended with more flexibility.
 *** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put,
     abbrev-table-p, abbrev-insert, abbrev-table-menu.
index 9091d9768cfa279c8bec3a2c923f26ce749f0bab..1db707fa2eb19897b61da642aa66bccf8a7e0a64 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-24  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
+
+       * diff-mode.el (diff-show-trailing-blanks): New fun.  Show trailing
+       blanks in modified lines for diff-mode.
+
 2008-07-24  Michael Albinus  <michael.albinus@gmx.de>
 
        * Makefile.in (ELCFILES): Add net/xesam.el.
index 7d5244162b7bfd2a459e95da7c17265434335be5..859f69540f95fc9933ca6636546f07a46ca2fa85 100644 (file)
@@ -1881,6 +1881,13 @@ I.e. like `add-change-log-entry-other-window' but applied to all hunks."
         ;; When there's no more hunks, diff-hunk-next signals an error.
        (error nil)))))
 
+(defun diff-show-trailing-blanks ()
+  "Show trailing blanks in modified lines for diff-mode."
+  (interactive)
+  (let ((whitespace-style '(trailing))
+        (whitespace-trailing-regexp "^[-\+!<>].*?\\([\t ]+\\)$"))
+    (whitespace-mode 1)))     ; display trailing blanks in diff buffer
+
 ;; provide the package
 (provide 'diff-mode)