summaryrefslogtreecommitdiff
path: root/.config/emacs/libraries/autoformat.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/libraries/autoformat.el')
-rw-r--r--.config/emacs/libraries/autoformat.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/emacs/libraries/autoformat.el b/.config/emacs/libraries/autoformat.el
index f9914e2..99cd09f 100644
--- a/.config/emacs/libraries/autoformat.el
+++ b/.config/emacs/libraries/autoformat.el
@@ -13,7 +13,11 @@ spaces with tabs."
(setq autoformat-do-untabify
(if (eq ARG 'toggle)
(not autoformat-do-untabify)
- ARG)))
+ ARG))
+
+ (message "Autoformatter will %suse spaces!"
+ (if autoformat-do-untabify
+ "" "no longer ")))
(defun autoformat--before-save-handler ()
"Automatically reformats spacing of the current buffer."
@@ -36,7 +40,7 @@ spaces with tabs."
:keymap (list
(cons (kbd "C-z f") #'autoformat-toggle-space-rule))
- (if (not autoformat-mode)
+ (if autoformat-mode
(add-hook 'prog-mode-hook #'autoformat--prog-mode-hook)
(remove-hook 'prog-mode-hook #'autoformat--prog-mode-hook)))