summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))