diff options
author | Alan Pearce | 2017-04-27 11:58:39 +0200 |
---|---|---|
committer | Alan Pearce | 2017-04-27 11:58:39 +0200 |
commit | 8a2b251810f31e6fe4caf1217d3647a32fceb905 (patch) | |
tree | a91466087fb2f934855401b110bd6ef6ab0a5582 /emacs | |
parent | bb46cf8f8ff70e89514f30a07b0619df23b6f09d (diff) | |
download | nixfiles-8a2b251810f31e6fe4caf1217d3647a32fceb905.tar.lz nixfiles-8a2b251810f31e6fe4caf1217d3647a32fceb905.tar.zst nixfiles-8a2b251810f31e6fe4caf1217d3647a32fceb905.zip |
Emacs: Use built-in trailing whitespace instead of ws-butler
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.org | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index c99e9578..a0441214 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 |