tools/flyspell: remove +flycheck-immediately #1824

This commit is contained in:
Henrik Lissner 2019-09-26 13:17:59 -04:00
parent a940f56fb4
commit 737407dcec
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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))