[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jit-spell 1e7d12ed82 3/3: Fix dictionary change
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jit-spell 1e7d12ed82 3/3: Fix dictionary change |
Date: |
Tue, 7 Mar 2023 15:57:58 -0500 (EST) |
branch: externals/jit-spell
commit 1e7d12ed824dc4e019a75e13eeb759f8e828a32a
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>
Fix dictionary change
---
jit-spell.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/jit-spell.el b/jit-spell.el
index c2a1e61b3e..60f3d7a964 100644
--- a/jit-spell.el
+++ b/jit-spell.el
@@ -239,22 +239,24 @@ It can also be bound to a mouse click to pop up the menu."
(overlay-put ov 'face face)
(setq jit-spell--hidden-overlay nil))))
-(defun jit-spell--unfontify (&optional start end)
- "Remove overlays and forget checking status from START to END (or whole
buffer)."
+(defun jit-spell--unfontify (&optional start end lax)
+ "Remove overlays and forget checking status from START to END (or whole
buffer).
+Force refontification of the region, unless LAX is non-nil."
(save-restriction
(widen)
(setq start (or start (point-min)))
(setq end (or end (point-max)))
(remove-overlays start end 'category 'jit-spell)
- (remove-list-of-text-properties start end '(jit-spell-pending))))
+ (remove-list-of-text-properties start end '(jit-spell-pending))
+ (unless lax (jit-lock-refontify start end))))
;;; Subprocess communication
(defun jit-spell--process-parameters ()
"Return a list of parameters for this buffer's ispell process."
(list ispell-program-name
- ispell-current-dictionary
- ispell-current-personal-dictionary
+ (or ispell-local-dictionary ispell-dictionary)
+ (or ispell-local-pdict ispell-personal-dictionary)
ispell-extra-args))
(defun jit-spell--get-process ()
@@ -278,6 +280,7 @@ The process plist includes the following properties:
(unless ispell-async-processp
(error "`jit-spell-mode' requires `ispell-async-processp'"))
(ispell-set-spellchecker-params)
+ (ispell-internal-change-dictionary)
(setq proc (ispell-start-process))
(set-process-query-on-exit-flag proc nil)
(setq jit-spell--process-pool
@@ -546,8 +549,8 @@ again moves to the next misspelling."
(remove-hook 'ispell-change-dictionary-hook 'jit-spell--unfontify t)
(kill-local-variable 'jit-spell--local-words)
(kill-local-variable 'jit-spell--filter-region)
- (kill-local-variable 'jit-spell--ignored-p)))
- (jit-spell--unfontify))
+ (kill-local-variable 'jit-spell--ignored-p)
+ (jit-spell--unfontify nil nil t))))
;; Don't litter M-x
(dolist (sym '(jit-spell--context-menu