From 33ec1aad063d30fd422b248fdaee20654cb8fc22 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Thu, 28 Jul 2016 21:56:56 +1000 Subject: [PATCH] only show trailing whitespace in text/prog modes --- lisp/my-gui.el | 2 -- lisp/my-other-modes.el | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.2