[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx a3901127d8: jinx-mode: Extract jinx--reschedule-ho
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx a3901127d8: jinx-mode: Extract jinx--reschedule-hooks variable |
Date: |
Fri, 24 Nov 2023 09:58:12 -0500 (EST) |
branch: externals/jinx
commit a3901127d82cc61768104c71ee58bcacd8fb8d29
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
jinx-mode: Extract jinx--reschedule-hooks variable
---
CHANGELOG.org | 1 +
jinx.el | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 048435f031..8ec4fe1548 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -13,6 +13,7 @@
command =jinx-correct= dispatches to one of those commands depending on the
prefix argument.
- Recommend libenchant 2.3.1 or newer. Print a message if Enchant is outdated.
+- Support $LANG=C and $LANG=POSIX environment variable settings.
* Version 0.9 (2023-07-02)
diff --git a/jinx.el b/jinx.el
index ca0fbc833d..f6075e9dde 100644
--- a/jinx.el
+++ b/jinx.el
@@ -254,6 +254,10 @@ checking."
;;;; Internal variables
+(defvar jinx--reschedule-hooks
+ '(window-state-change-hook window-scroll-functions post-command-hook)
+ "Hooks which reschedule the spell checking timer, see `jinx--reschedule'.")
+
(defvar jinx--predicates
(list #'jinx--face-ignored-p
#'jinx--regexp-ignored-p
@@ -990,18 +994,16 @@ This command dispatches to the following commands:
(seq-some #'derived-mode-p jinx-camel-modes))
jinx--session-words (split-string jinx-local-words))
(jinx--load-dicts)
- (add-hook 'window-state-change-hook #'jinx--reschedule nil t)
- (add-hook 'window-scroll-functions #'jinx--reschedule nil t)
- (add-hook 'post-command-hook #'jinx--reschedule nil t)
+ (dolist (hook jinx--reschedule-hooks)
+ (add-hook hook #'jinx--reschedule nil t))
(jit-lock-register #'jinx--mark-pending))
(t
(mapc #'kill-local-variable '(jinx--exclude-regexp jinx--include-faces
jinx--exclude-faces jinx--camel
jinx--dicts jinx--syntax-table
jinx--session-words))
- (remove-hook 'window-state-change-hook #'jinx--reschedule t)
- (remove-hook 'window-scroll-functions #'jinx--reschedule t)
- (remove-hook 'post-command-hook #'jinx--reschedule t)
+ (dolist (hook jinx--reschedule-hooks)
+ (remove-hook hook #'jinx--reschedule t))
(jit-lock-unregister #'jinx--mark-pending)
(jinx--cleanup))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/jinx a3901127d8: jinx-mode: Extract jinx--reschedule-hooks variable,
ELPA Syncer <=