From 3b80e972dad31e241ebeccd0b3ecbd648901682a Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 11 Oct 2023 22:28:50 +0200 Subject: Disable trailing-space highlighting in help and eww (dash-docs) modes --- tw/home/files/emacs-init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tw/home/files/emacs-init.el') diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index 2c11692b..67168122 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -96,6 +96,13 @@ If CREATE is true and the resulting directory does not exist, create it." (add-hook 'mail-mode-hook #'auto-fill-mode) +(defun tw/hide-trailing-whitespace () + "Don't highlight trailing whitespace for this buffer." + (setq-local show-trailing-whitespace nil)) + +(add-hook 'help-mode-hook #'tw/hide-trailing-whitespace) +(add-hook 'eww-mode-hook #'tw/hide-trailing-whitespace) + (defun tw/enable-word-wrap () "Enable word wrapping." (toggle-word-wrap +1)) -- cgit v1.2.3