From de2e41774f11a0b76a65c1daa9021d1ed3b3f556 Mon Sep 17 00:00:00 2001 From: UndeadKernel Date: Wed, 2 Jan 2019 10:47:19 +0100 Subject: [PATCH] latex fix: enable spell checking correctly The varible `TeX-mode-local-vars-hook` is not called correctly as AucTeX reports that the major mode in a LaTeX file is `latex-mode`. Instead, let's use `latex-mode-local-vars-hook` to enable flyspell. This change enables disabling the feature of flyspell of immediately spellchecking a document with: `(setq-hook! 'TeX-mode-hook +spellcheck-immediately nil)` --- modules/lang/latex/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index f405b20db..45b29a792 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -66,7 +66,7 @@ If no viewers are found, `latex-preview-pane' is used.") ;; Enable rainbow mode after applying styles to the buffer (add-hook 'TeX-update-style-hook #'rainbow-delimiters-mode) (when (featurep! :feature spellcheck) - (add-hook 'TeX-mode-local-vars-hook #'flyspell-mode)) + (add-hook 'latex-mode-local-vars-hook #'flyspell-mode)) ;; All these excess pairs dramatically slow down typing in latex buffers, so ;; we remove them. Let snippets do their job. (after! smartparens-latex