dot/emacs, el/dot-emacs.el: Use `whitespace' mode to show anomalies.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 14 Dec 2009 14:34:39 +0000 (14:34 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 15 Dec 2009 12:06:37 +0000 (12:06 +0000)
Unfortunately, `whitespace' doesn't suppress highlighting of trailing
space when the cursor is at end-of-line, so we hack `trailing' out of
`whitespace-style' when turning on the fontification.

dot/emacs
el/dot-emacs.el

index 4401cc6..cbb825a 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (setq-default fill-column 77)          ;I use rather narrow windows
 (setq-default comment-column 40)       ;Set a standard comment column
 (setq-default truncate-partial-width-windows nil)
+(setq default-indicate-empty-lines t)
+(setq whitespace-style
+      '(trailing space-before-tab space-after-tab empty indentation))
 (setq woman-use-own-frame nil)         ;Keep man pages somewhere sensible
 (setq diff-switches "-u"               ;I like reading unified diffs
       cvs-diff-flags (list diff-switches))
index eec1dcf..95cfac4 100644 (file)
@@ -681,6 +681,8 @@ case."
   (auto-fill-mode 1)
   (setq fill-column 77)
   (setq show-trailing-whitespace t)
+  (let ((whitespace-style (remove 'trailing whitespace-style)))
+    (whitespace-mode t))
   (and (fboundp 'gtags-mode)
        (gtags-mode))
   (outline-minor-mode t)