diff options
| author | Stefan Monnier | 2006-01-15 05:46:20 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-01-15 05:46:20 +0000 |
| commit | ef0f5f7e622fa2e569228abc40f0f50eb5bb637f (patch) | |
| tree | c6b6cf8e516fe04612d19c2b39139ab1bb6a2f04 /lisp/textmodes | |
| parent | 2834b9b3b81bd5f3dbbf97a18aac519d3bf7534c (diff) | |
| download | emacs-ef0f5f7e622fa2e569228abc40f0f50eb5bb637f.tar.gz emacs-ef0f5f7e622fa2e569228abc40f0f50eb5bb637f.zip | |
(flyspell-kill-ispell-hook): New fun.
(flyspell-mode-on): Use it.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/flyspell.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 39d4b1f7b69..665d6c59fd7 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -525,6 +525,11 @@ in your .emacs file. | |||
| 525 | (member (or ispell-local-dictionary ispell-dictionary) | 525 | (member (or ispell-local-dictionary ispell-dictionary) |
| 526 | flyspell-dictionaries-that-consider-dash-as-word-delimiter))))) | 526 | flyspell-dictionaries-that-consider-dash-as-word-delimiter))))) |
| 527 | 527 | ||
| 528 | (defun flyspell-kill-ispell-hook () | ||
| 529 | (setq flyspell-last-buffer nil) | ||
| 530 | (dolist (buf (buffer-list)) | ||
| 531 | (kill-local-variable 'flyspell-word-cache-word))) | ||
| 532 | |||
| 528 | ;;*---------------------------------------------------------------------*/ | 533 | ;;*---------------------------------------------------------------------*/ |
| 529 | ;;* flyspell-mode-on ... */ | 534 | ;;* flyspell-mode-on ... */ |
| 530 | ;;*---------------------------------------------------------------------*/ | 535 | ;;*---------------------------------------------------------------------*/ |
| @@ -536,6 +541,8 @@ in your .emacs file. | |||
| 536 | (or ispell-local-dictionary ispell-dictionary | 541 | (or ispell-local-dictionary ispell-dictionary |
| 537 | (if flyspell-default-dictionary | 542 | (if flyspell-default-dictionary |
| 538 | (ispell-change-dictionary flyspell-default-dictionary))) | 543 | (ispell-change-dictionary flyspell-default-dictionary))) |
| 544 | ;; Make sure we flush our caches when needed. | ||
| 545 | (add-hook 'ispell-kill-ispell-hook 'flyspell-kill-ispell-hook) | ||
| 539 | ;; we have to force ispell to accept the local definition or | 546 | ;; we have to force ispell to accept the local definition or |
| 540 | ;; otherwise it could be too late, the local dictionary may | 547 | ;; otherwise it could be too late, the local dictionary may |
| 541 | ;; be forgotten! | 548 | ;; be forgotten! |