From: Mark Wooding Date: Mon, 14 Dec 2009 14:34:39 +0000 (+0000) Subject: dot/emacs, el/dot-emacs.el: Use `whitespace' mode to show anomalies. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/3459d2cb13fc7275693ed1f9e2d5e9a7af0b99ec dot/emacs, el/dot-emacs.el: Use `whitespace' mode to show anomalies. 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. --- diff --git a/dot/emacs b/dot/emacs index 4401cc6..cbb825a 100644 --- a/dot/emacs +++ b/dot/emacs @@ -202,6 +202,9 @@ (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)) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index eec1dcf..95cfac4 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -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)