diff --git a/modules/feature/spellcheck/config.el b/modules/feature/spellcheck/config.el index 37e9b1cc0..9f2158a32 100644 --- a/modules/feature/spellcheck/config.el +++ b/modules/feature/spellcheck/config.el @@ -5,7 +5,13 @@ :config (setq ispell-program-name (executable-find "aspell") ispell-list-command "--list" - ispell-extr-args '("--dont-tex-check-comments"))) + ispell-extr-args '("--dont-tex-check-comments")) + + (defun +spellcheck|automatically () + "Spellcheck the buffer when `flyspell-mode' is enabled." + (when flyspell-mode + (flyspell-buffer))) + (add-hook 'flyspell-mode-hook #'+spellcheck|automatically)) (def-package! flyspell-correct