summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org22
1 files changed, 11 insertions, 11 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index c99e957..a044121 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -669,20 +669,20 @@ with a buffer.
         (kill-buffer buf)))))
 #+END_SRC
 
-** Whitespace Butler
+** Whitespace
 
-I don’t like it when editors change an entire file’s layout when I
-open it.  Whitespace butler fixes whitespace only for lines that I’m editing.
+Show bad whitespace, so that I can fix it.
 
 #+BEGIN_SRC emacs-lisp
-(use-package ws-butler
-  :if window-system
-  :diminish ws-butler-mode
-  :config (ws-butler-global-mode 1))
-(if (daemonp)
-    (add-hook 'before-make-frame-hook (lambda ()
-                                        (use-package ws-butler
-                                          :config (ws-butler-global-mode 1)))))
+(defun show-trailing-whitespace-on ()
+  (interactive)
+  (setq-local show-trailing-whitespace t))
+(defun show-trailing-whitespace-off ()
+  (interactive)
+  (setq-local show-trailing-whitespace nil))
+(add-hook 'prog-mode-hook #'show-trailing-whitespace-on)
+(add-hook 'text-mode-hook #'show-trailing-whitespace-on)
+(setq-default show-trailing-whitespace t)
 #+END_SRC
 
 ** shrink-whitespace