From 27660673215f72f8ff251182b4ceed4f4db48529 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Sun, 5 Nov 2017 22:17:20 +0100 Subject: [PATCH] emacs - Trailing whitespaces only in prog-mode Apparently many other modes have trailing whitespaces and they are hilighted in places I don't care. --- emacs/.emacs.d/init.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 5871d93..8ec2410 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -170,10 +170,9 @@ (let ((whitespace-style '(empty trailing))) (whitespace-cleanup))) (add-hook 'before-save-hook 'buffer-cleanup-whitespace) -(setq-default show-trailing-whitespace t) -;; Buffer Menu does trailing whitespace, don't show them -(add-hook 'buffer-menu-mode-hook - (lambda () (setq-local show-trailing-whitespace nil))) +(add-hook 'prog-mode-hook + (lambda () + (setq show-trailing-whitespace t))) ;; ensure repo cache is up1date (or (file-exists-p package-user-dir)