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

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

[elpa] externals/jinx 772fee317f 1/2: jinx--word-valid-p: More restricti


From: ELPA Syncer
Subject: [elpa] externals/jinx 772fee317f 1/2: jinx--word-valid-p: More restrictive check of capitalized words
Date: Sun, 30 Jul 2023 09:58:06 -0400 (EDT)

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

    jinx--word-valid-p: More restrictive check of capitalized words
---
 jinx.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/jinx.el b/jinx.el
index 44bfd79a72..02b1ec64d2 100644
--- a/jinx.el
+++ b/jinx.el
@@ -356,11 +356,12 @@ Predicate may return a position to skip forward.")
         case-fold-search)
     (or (member word jinx--session-words)
         ;; Allow capitalized words
-        (and (string-match-p "\\`[[:upper:]]" word)
+        (and (string-match-p "\\`[[:upper:]][[:lower:]]+\\'" word)
              (cl-loop
               for w in jinx--session-words
               thereis (and (eq t (compare-strings word 0 1   w 0 1   t))
-                           (eq t (compare-strings word 1 nil w 1 nil nil)))))
+                           (eq t (compare-strings word 1 nil w 1 nil nil))
+                           (string-match-p "\\`[[:lower:]]+\\'" w))))
         (cl-loop for dict in jinx--dicts
                  thereis (jinx--mod-check dict word)))))
 



reply via email to

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