Commit 943f8a088fe7

Vincent Demeester <vincent@sbr.pm>
2015-04-16 14:27:12
Add a hook to enable whitespace-mode for diff-mode
1 parent 56734ca
Changed files (1)
.emacs.d
.emacs.d/emacs.org
@@ -1284,6 +1284,27 @@
         :config (move-text-default-bindings))
     #+END_SRC
 
+*** Diff
+
+    The =diff-mode= of Emacs is pretty cool, but let's show important
+    whitespace when in this mode.
+
+    #+BEGIN_SRC emacs-lisp
+      (add-hook 'diff-mode-hook (lambda ()
+                                  (setq-local whitespace-style
+                                              '(face
+                                                tabs
+                                                tab-mark
+                                                spaces
+                                                space-mark
+                                                trailing
+                                                indentation::space
+                                                indentation::tab
+                                                newline
+                                                newline-mark))
+                                  (whitespace-mode 1)))
+    #+END_SRC
+
 ** Terminal
 
    Let's install and use [[http://www.emacswiki.org/emacs/MultiTerm][multi-term]], which is a cool addition to =term.el=.