diff options
author | Kyle Meyer <kyle@kyleam.com> | 2018-12-09 14:44:19 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2018-12-09 14:44:19 -0500 |
commit | 91aa2a6bb65653bd63c866f8e5c7f1887761377e (patch) | |
tree | b51b712773f54c42716f6eeb8f740187926cb409 | |
parent | 989fb5f35574d51bad3faf359b60398c4bf93b89 (diff) | |
download | emacs.d-91aa2a6bb65653bd63c866f8e5c7f1887761377e.tar.gz |
km/cleanup-buffer: Make sure whitespace-mode is bound
-rw-r--r-- | init.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -513,7 +513,8 @@ (defun km/cleanup-buffer () (interactive) - (unless (or whitespace-mode global-whitespace-mode) + (unless (or (bound-and-true-p whitespace-mode) + global-whitespace-mode) (whitespace-cleanup) (delete-trailing-whitespace))) (add-hook 'before-save-hook #'km/cleanup-buffer)) |