From: James Bunton Date: Thu, 28 Jul 2016 11:56:56 +0000 (+1000) Subject: only show trailing whitespace in text/prog modes X-Git-Url: https://code.delx.au/dotemacs/commitdiff_plain/33ec1aad063d30fd422b248fdaee20654cb8fc22 only show trailing whitespace in text/prog modes --- diff --git a/lisp/my-gui.el b/lisp/my-gui.el index 3ee0900..4408b31 100644 --- a/lisp/my-gui.el +++ b/lisp/my-gui.el @@ -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) diff --git a/lisp/my-other-modes.el b/lisp/my-other-modes.el index 778093c..c8baa03 100644 --- a/lisp/my-other-modes.el +++ b/lisp/my-other-modes.el @@ -36,6 +36,10 @@ (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)