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

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

[elpa] externals/jinx 710fb8b79c: Minor simplification


From: ELPA Syncer
Subject: [elpa] externals/jinx 710fb8b79c: Minor simplification
Date: Wed, 12 Apr 2023 17:58:42 -0400 (EDT)

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

    Minor simplification
---
 jinx.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/jinx.el b/jinx.el
index 12f1773afd..7948877429 100644
--- a/jinx.el
+++ b/jinx.el
@@ -313,9 +313,9 @@ FLAG must be t or nil."
     (while (< pos end)
       (let* ((from (jinx--find-visible-pending pos end t))
              (to (jinx--find-visible-pending from end nil)))
-        (if (< from to)
-            (setq pos (jinx--check-region from to))
-          (setq pos to))))))
+        (when (< from to)
+          (jinx--check-region from to))
+        (setq pos to)))))
 
 (defun jinx--force-check-region (start end)
   "Enforce spell-check of region between START and END."
@@ -325,8 +325,7 @@ FLAG must be t or nil."
     (jinx--check-region start end)))
 
 (defun jinx--check-region (start end)
-  "Check region between START and END.
-Return updated END position."
+  "Check region between START and END."
   (let ((st (syntax-table))
         (case-fold-search nil))
     (unwind-protect
@@ -370,8 +369,7 @@ Return updated END position."
                          (overlay-put (make-overlay word-start subword-end) 
'category 'jinx)))
                       (setq word-start subword-end)))))
               (remove-list-of-text-properties start end '(jinx--pending)))))
-      (set-syntax-table st)))
-  end)
+      (set-syntax-table st))))
 
 (defun jinx--get-overlays (start end &optional visible)
   "Return misspelled word overlays between START and END.



reply via email to

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