[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jit-spell 9ea9cf4089 2/3: Don't share local word list w
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jit-spell 9ea9cf4089 2/3: Don't share local word list with ispell |
Date: |
Tue, 7 Mar 2023 15:57:58 -0500 (EST) |
branch: externals/jit-spell
commit 9ea9cf40892a178d57e2693d306c3817dfb565c4
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>
Don't share local word list with ispell
---
jit-spell.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/jit-spell.el b/jit-spell.el
index fc32edff14..c2a1e61b3e 100644
--- a/jit-spell.el
+++ b/jit-spell.el
@@ -118,6 +118,9 @@ move the point with impunity.")
(defvar-local jit-spell--recheck-timer nil
"Timer to debounce recheck requests.")
+(defvar-local jit-spell--local-words nil
+ "A list of words accepted temporarily in this buffer.")
+
;;; Mode-specific support
(defun jit-spell--default-ignored-p (start end)
@@ -129,7 +132,7 @@ move the point with impunity.")
face)
(memq face jit-spell-ignored-faces)))
(member (buffer-substring-no-properties start end)
- ispell-buffer-session-localwords)))
+ jit-spell--local-words)))
(defun jit-spell--prog-ignored-p (start _end)
"Additional ignore predicate for `prog-mode'."
@@ -425,7 +428,7 @@ the above)."
(pcase-exhaustive where
('session (when ispell-buffer-local-name
(setq ispell-buffer-local-name (buffer-name)))
- (cl-pushnew word ispell-buffer-session-localwords
+ (cl-pushnew word jit-spell--local-words
:test #'equal))
('buffer (ispell-add-per-file-word-list word)
(jit-spell--accept-word word 'session))
@@ -541,7 +544,7 @@ again moves to the next misspelling."
(jit-lock-unregister #'jit-spell--check-region)
(remove-hook 'context-menu-functions 'jit-spell--context-menu t)
(remove-hook 'ispell-change-dictionary-hook 'jit-spell--unfontify t)
- (kill-local-variable 'ispell-buffer-session-localwords)
+ (kill-local-variable 'jit-spell--local-words)
(kill-local-variable 'jit-spell--filter-region)
(kill-local-variable 'jit-spell--ignored-p)))
(jit-spell--unfontify))