From ea30b51f2b09e4055a15ea98656e2afa1101414c Mon Sep 17 00:00:00 2001 From: bd Date: Fri, 29 Mar 2024 19:30:16 -0600 Subject: Minor fixes for autoformatter library --- .config/emacs/libraries/autoformat.el | 8 ++++++-- 1 file 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))) -- cgit v1.2.3