diff --git a/modules/checkers/spell/autoload/+spell-fu.el b/modules/checkers/spell/autoload/+spell-fu.el index f8d26a3e2..25a0a1063 100644 --- a/modules/checkers/spell/autoload/+spell-fu.el +++ b/modules/checkers/spell/autoload/+spell-fu.el @@ -50,12 +50,14 @@ (defun +spell/correct () "Correct spelling of word at point." (interactive) - ;; HACK Fake awareness for our personal dictionary by stopping short if - ;; spell-fu hasn't highlighted the current word. This is necessary - ;; because ispell/aspell struggles to find our - ;; `ispell-personal-dictionary' if it's not in $HOME. - (unless (memq 'spell-fu-incorrect-face (face-at-point nil t)) - (user-error "%S is correct" (thing-at-point 'word t))) + ;; spell-fu fails to initialize correctly if it can't find aspell or a similar + ;; program. We want to signal the error, not tell the user that every word is + ;; spelled correctly. + (unless (;; This is what spell-fu uses to check for the aspell executable + or (and ispell-really-aspell ispell-program-name) + (executable-find "aspell")) + (user-error "Aspell is required for spell checking")) + (ispell-set-spellchecker-params) (save-current-buffer (ispell-accept-buffer-local-defs)) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 5886d7979..b28bc4b05 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -74,7 +74,7 @@ :when (executable-find "aspell") :hook (text-mode . spell-fu-mode) :general ([remap ispell-word] #'+spell/correct) - :init + :preface (defvar +spell-correct-interface (cond ((featurep! :completion ivy) #'+spell-correct-ivy-fn) @@ -83,6 +83,7 @@ (#'+spell-correct-generic-fn)) "Function to use to display corrections.") + :init (defvar +spell-excluded-faces-alist '((markdown-mode . (markdown-code-face