summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-12-09 14:44:19 -0500
committerKyle Meyer <kyle@kyleam.com>2018-12-09 14:44:19 -0500
commit91aa2a6bb65653bd63c866f8e5c7f1887761377e (patch)
treeb51b712773f54c42716f6eeb8f740187926cb409
parent989fb5f35574d51bad3faf359b60398c4bf93b89 (diff)
downloademacs.d-91aa2a6bb65653bd63c866f8e5c7f1887761377e.tar.gz
km/cleanup-buffer: Make sure whitespace-mode is bound
-rw-r--r--init.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.el b/init.el
index 525ce94..02bfd36 100644
--- a/init.el
+++ b/init.el
@@ -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))