diff options
-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)) |