Apply spell-fu blacklist to derived modes

This commit is contained in:
Henrik Lissner 2020-12-12 23:22:00 -05:00
parent 5d3496575c
commit 930524f3ac
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -147,7 +147,7 @@
(add-hook! 'spell-fu-mode-hook (add-hook! 'spell-fu-mode-hook
(defun +spell-init-excluded-faces-h () (defun +spell-init-excluded-faces-h ()
"Set `spell-fu-faces-exclude' according to `+spell-excluded-faces-alist'." "Set `spell-fu-faces-exclude' according to `+spell-excluded-faces-alist'."
(when-let (excluded (alist-get major-mode +spell-excluded-faces-alist)) (when-let (excluded (cdr (cl-find-if #'derived-mode-p +spell-excluded-faces-alist :key #'car)))
(setq-local spell-fu-faces-exclude excluded)))) (setq-local spell-fu-faces-exclude excluded))))
;; TODO custom `spell-fu-check-range' function to reduce false positives ;; TODO custom `spell-fu-check-range' function to reduce false positives