From cff2d15990eec68c11a64fe376505c69785c8135 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 5 Aug 2017 12:28:26 -0400 Subject: [PATCH] Only use show-trailing-whitespace in prog-mode --- .emacs.d/init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2237832..f418d19 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -14,7 +14,6 @@ vc-follow-symlinks t custom-file (expand-file-name "~/.emacs.d/custom.el") gc-cons-threshold 100000000) -(setq-default show-trailing-whitespace t) (load-theme 'fred t) (savehist-mode 1) (show-paren-mode 1) @@ -194,6 +193,11 @@ ; bind a key to revert buffers with no prompt (bind-key "C-x M-v" (lambda () (interactive) (revert-buffer t t t)))) +(use-package prog-mode + :config + (add-hook 'prog-mode-hook + #'(lambda () (setq-local show-trailing-whitespace t)))) + ;;;; external packages (required) (use-package company :ensure :config