summaryrefslogtreecommitdiffstats
path: root/lisp/init-appearance.el
diff options
context:
space:
mode:
authorMartin Polden <martin.polden@gmail.com>2015-04-06 18:06:37 +0200
committerMartin Polden <martin.polden@gmail.com>2015-04-06 18:06:37 +0200
commit78acbe390a9fa6c2492ffe65163980eb30f1c3a6 (patch)
treebd7f13301125f8ada3bea67b02ef3ee9ce08380c /lisp/init-appearance.el
parent24525e5461e285dc35301936c0ac803b63c70fc1 (diff)
Make whitespace-mode use fill-column
Diffstat (limited to 'lisp/init-appearance.el')
-rw-r--r--lisp/init-appearance.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/init-appearance.el b/lisp/init-appearance.el
index 320ee2b..1c5d3fe 100644
--- a/lisp/init-appearance.el
+++ b/lisp/init-appearance.el
@@ -28,10 +28,15 @@
;; highlight matching parentheses
(show-paren-mode 1)
-;; highlight lines exceeding 80 columns
+;; highlight lines exceeding fill-column
(require 'whitespace)
(setq whitespace-style '(face empty lines-tail trailing))
-(add-hook 'prog-mode-hook 'whitespace-mode)
+(setq whitespace-line-column nil)
+;; make whitespace-mode respect a mode-specific fill-column value
+(add-hook 'hack-local-variables-hook
+ (lambda ()
+ (when (derived-mode-p 'prog-mode)
+ (whitespace-mode))))
;; disable word wrapping
(setq-default truncate-lines t)