diff options
author | bd <bdunahu@colostate.edu> | 2024-03-29 19:30:16 -0600 |
---|---|---|
committer | bd <bdunahu@colostate.edu> | 2024-03-29 19:30:16 -0600 |
commit | ea30b51f2b09e4055a15ea98656e2afa1101414c (patch) | |
tree | 546db44a92d190ae4d48fff4dd2ba5b98f41fc5b | |
parent | 7978c5c6ca4460f470eeed6040777c25df5b3597 (diff) |
Minor fixes for autoformatter library
-rw-r--r-- | .config/emacs/libraries/autoformat.el | 8 |
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))) |