branch: externals/guess-language
commit e28742b35678eb4bdcbcbe5a5eb37021891f3b71
Author: Titus von der Malsburg <[email protected]>
Commit: Titus von der Malsburg <[email protected]>
Do not mess with flyspell defcustoms.
---
guess-language.el | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/guess-language.el b/guess-language.el
index f736866..ebc2a2c 100644
--- a/guess-language.el
+++ b/guess-language.el
@@ -125,14 +125,11 @@ current paragraph."
(guess-language-autoset)
(unless (string= old-dictionary ispell-local-dictionary)
(remove-hook 'flyspell-incorrect-hook
#'guess-language-autoset-and-spellcheck-maybe)
- (flyspell-region (save-excursion (backward-paragraph) (point))
- (save-excursion (forward-paragraph) (point)))
- (add-hook 'flyspell-incorrect-hook
#'guess-language-autoset-and-spellcheck-maybe)))))
-
-(setq flyspell-issue-welcome-flag nil)
-(setq flyspell-issue-message-flag nil)
-
-(make-variable-buffer-local 'flyspell-incorrect-hook)
+ (let ((flyspell-issue-welcome-flag nil)
+ (flyspell-issue-message-flag nil))
+ (flyspell-region (save-excursion (backward-paragraph) (point))
+ (save-excursion (forward-paragraph) (point)))
+ (add-hook 'flyspell-incorrect-hook
#'guess-language-autoset-and-spellcheck-maybe))))))
(define-minor-mode guess-language-mode
"Toggle guess-language mode.