diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-21 12:33:28 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-21 12:33:28 +0200 |
commit | 997140692fbd58494ac172ee507bb5e218595083 (patch) | |
tree | 661328ae8a2659b919d35a6802cf675ba8c74642 | |
parent | f22e285511459d96d0cdfe5c8db3e050cf63284a (diff) |
emacs: Set show-trailing-whitespace only in specific modes
-rw-r--r-- | .config/emacs/init.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index b73a7fa..a88d5e6 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -149,7 +149,6 @@ buffer suppressed." (save-interprogram-paste-before-kill t) (scroll-conservatively 101) ; (info "(Emacs)Auto Scrolling") (scroll-error-top-bottom t) - (show-trailing-whitespace t) (user-full-name "Thomas Voss") (user-mail-address "mail@thomasvoss.com") (vc-follow-symlinks t) @@ -166,6 +165,12 @@ buffer suppressed." (add-hook 'text-mode-hook #'auto-fill-mode) (prefer-coding-system 'utf-8) + ;; Show trailing whitespace but only in relevant buffers + (dolist (mode '(conf-mode prog-mode text-mode)) + (add-hook (mm-mode-to-hook mode) + (defun mm-show-trailing-whitespace () + (setopt show-trailing-whitespace t)))) + ;; Disabled modes (blink-cursor-mode -1) (line-number-mode -1) |