From 91aa2a6bb65653bd63c866f8e5c7f1887761377e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 9 Dec 2018 14:44:19 -0500 Subject: km/cleanup-buffer: Make sure whitespace-mode is bound --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.3