Activate flyspell-mode in specific modes

yaml-mode is derived from text-mode, rather than prog or conf-mode. This
may be true for other major modes, so we must be more judicious about
where we activate flyspell-mode.
This commit is contained in:
Henrik Lissner 2020-01-20 19:20:34 -05:00
parent e3ff1f25b4
commit fb24a8deec
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 11 additions and 5 deletions

View file

@ -48,9 +48,18 @@
;; messages for every word when checking the entire buffer
flyspell-issue-message-flag nil)
(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook! '(org-mode-hook
markdown-mode-hook
TeX-mode-hook
rst-mode-hook
mu4e-compose-mode-hook
message-mode-hook)
#'flyspell-mode)
(when (featurep! +everywhere)
(add-hook! '(conf-mode-hook prog-mode-hook)
(add-hook! '(yaml-mode-hook
conf-mode-hook
prog-mode-hook)
#'flyspell-prog-mode))
(add-hook! 'flyspell-mode-hook