]> code.delx.au - dotemacs/commitdiff
only show trailing whitespace in text/prog modes
authorJames Bunton <jamesbunton@delx.net.au>
Thu, 28 Jul 2016 11:56:56 +0000 (21:56 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Thu, 28 Jul 2016 13:43:13 +0000 (23:43 +1000)
lisp/my-gui.el
lisp/my-other-modes.el

index 3ee090028a0aad4f86cd0695f067a5e0d05b9cf7..4408b31d5fd03af349225f224d86f3b58e2fdcd3 100644 (file)
@@ -16,8 +16,6 @@
 
 (show-paren-mode t)
 
-(setq-default show-trailing-whitespace t)
-
 (require 'uniquify)
 (setq uniquify-strip-common-suffix t)
 (setq uniquify-buffer-name-style 'post-forward)
index 778093cab732846e1f9a13310ba9839d41bb0f1e..c8baa0329a8b1c59e8941a507290e5cf7703de47 100644 (file)
 (require 'saveplace)
 (setq-default save-place t)
 
+(dolist (hook '(prog-mode-hook text-mode-hook))
+  (add-hook hook (lambda ()
+                   (setq show-trailing-whitespace t))))
+
 (setq undo-limit 10000000)
 (setq undo-strong-limit undo-limit)