emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/jinx f1894a8d6c 1/3: Bind case-fold-search=nil during c


From: ELPA Syncer
Subject: [elpa] externals/jinx f1894a8d6c 1/3: Bind case-fold-search=nil during checking
Date: Fri, 31 Mar 2023 06:58:44 -0400 (EDT)

branch: externals/jinx
commit f1894a8d6c8869bd67e00659e228fc219be113d9
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Bind case-fold-search=nil during checking
---
 jinx.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/jinx.el b/jinx.el
index 20175a7571..0d89bf0307 100644
--- a/jinx.el
+++ b/jinx.el
@@ -235,12 +235,11 @@ Predicate may return a position to skip forward.")
 (defun jinx--regexp-ignored-p (start)
   "Return non-nil if word at START matches ignore regexps."
   (save-excursion
-    (let (case-fold-search)
-      (goto-char start)
-      (when (and jinx--exclude-regexp (looking-at-p jinx--exclude-regexp))
-        (save-match-data
-          (looking-at jinx--exclude-regexp)
-          (match-end 0))))))
+    (goto-char start)
+    (when (and jinx--exclude-regexp (looking-at-p jinx--exclude-regexp))
+      (save-match-data
+        (looking-at jinx--exclude-regexp)
+        (match-end 0)))))
 
 (defun jinx--face-ignored-p (start)
   "Return non-nil if face at START of word is ignored."
@@ -269,7 +268,8 @@ some Emacs modes."
   (when-let ((pred (or (bound-and-true-p flyspell-generic-check-word-predicate)
                        (get major-mode 'flyspell-mode-predicate))))
     (with-syntax-table jinx--mode-syntax-table
-      (ignore-errors (not (funcall pred))))))
+      (let ((case-fold-search t))
+        (ignore-errors (not (funcall pred)))))))
 
 ;;;; Internal functions
 
@@ -310,7 +310,8 @@ FLAG must be t or nil."
 (defun jinx--check-region (start end)
   "Check region between START and END.
 Return updated END position."
-  (let ((jinx--mode-syntax-table (syntax-table)))
+  (let ((jinx--mode-syntax-table (syntax-table))
+        (case-fold-search nil))
     (unwind-protect
         (with-silent-modifications
           (save-excursion



reply via email to

[Prev in Thread] Current Thread [Next in Thread]