diff --git a/modules/tools/flyspell/config.el b/modules/tools/flyspell/config.el index 3f1601fd1..147c1d0cc 100644 --- a/modules/tools/flyspell/config.el +++ b/modules/tools/flyspell/config.el @@ -1,13 +1,5 @@ ;;; tools/flyspell/config.el -*- lexical-binding: t; -*- -(defvar-local +flyspell-immediately t - "If non-nil, spellcheck the current buffer upon starting `flyspell-mode'. - -Since spellchecking can be slow in some buffers, this can be disabled with: - - (setq-hook! 'TeX-mode-hook +flyspell-immediately nil)") - - ;; ;;; Packages @@ -66,12 +58,6 @@ e.g. proselint and langtool." (featurep 'langtool)) (setq-local flyspell-mark-duplications-flag nil)))) - (add-hook! 'flyspell-mode-hook - (defun +flyspell-immediately-h () - "Spellcheck the buffer when `flyspell-mode' is enabled." - (when (and flyspell-mode +flyspell-immediately) - (flyspell-buffer)))) - ;; Ensure mode-local predicates declared with `set-flyspell-predicate!' are ;; used in their respective major modes. (add-hook 'flyspell-mode-hook #'+flyspell-init-predicate-h))