]> code.delx.au - gnu-emacs/blobdiff - lisp/diff-mode.el
(hi-lock-line-face-buffer, hi-lock-face-buffer)
[gnu-emacs] / lisp / diff-mode.el
index da1cd30198f25c0b8bb2fc107a8d4325e7a94479..d61f7689ae52e9c121f26562db0dffa20e6f1745 100644 (file)
@@ -219,7 +219,7 @@ when editing big diffs)."
   "Automatically highlight changes in detail as the user visits hunks.
 When transitioning from disabled to enabled,
 try to refine the current hunk, as well."
   "Automatically highlight changes in detail as the user visits hunks.
 When transitioning from disabled to enabled,
 try to refine the current hunk, as well."
-  :group 'diff-mode :init-value t :lighter " Auto-Refine"
+  :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
   (when diff-auto-refine-mode
     (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
 
   (when diff-auto-refine-mode
     (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
 
@@ -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)))))
 
         ;; When there's no more hunks, diff-hunk-next signals an error.
        (error nil)))))
 
+(defun diff-show-trailing-whitespaces ()
+  "Show trailing whitespaces 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)
 
 ;; provide the package
 (provide 'diff-mode)