diff options
Diffstat (limited to 'tw/home')
-rw-r--r-- | tw/home/files/emacs-init.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index 1fea6749..12f8e5e3 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -54,7 +54,6 @@ If CREATE is true and the resulting directory does not exist, create it." (sentence-end-double-space nil "Use a single space after a sentence.") (fill-column 78 "Make hard-wrapped text a bit wider.") (require-final-newline t "Always add a final newline on save, if there is none.") - (show-trailing-whitespace t "Always show trailing spaces.") ;; Make Emacs a good Guix citizen. (package-archives nil "Don't fetch packages from the internet; only get them from Guix.") ;; Default mode. @@ -95,12 +94,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)) +(defun tw/show-trailing-whitespace () + "Highlight trailing spaces in the current buffer." + (setq-local show-trailing-whitespace t)) -(add-hook 'help-mode-hook #'tw/hide-trailing-whitespace) -(add-hook 'eww-mode-hook #'tw/hide-trailing-whitespace) +(mapc (lambda (hook) + (add-hook hook #'tw/show-trailing-whitespace)) + '(prog-mode-hook conf-mode-hook yaml-mode-hook alidist-mode-hook)) (defun tw/enable-word-wrap () "Enable word wrapping." |