From 3ff85f6f373f4eb96eeee2d6408cb687f1cbc0eb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 16 Jan 2018 01:55:06 -0500 Subject: [PATCH] feature/spellcheck: auto-check buffer on flycheck-mode --- modules/feature/spellcheck/config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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