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

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

[elpa] externals/jinx f966592133 2/8: Reset syntax table correctly


From: ELPA Syncer
Subject: [elpa] externals/jinx f966592133 2/8: Reset syntax table correctly
Date: Wed, 29 Mar 2023 22:58:45 -0400 (EDT)

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

    Reset syntax table correctly
---
 jinx.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/jinx.el b/jinx.el
index dbefcbe001..9fec165919 100644
--- a/jinx.el
+++ b/jinx.el
@@ -355,16 +355,16 @@ Return updated END position."
         (with-silent-modifications
           (save-excursion
             (save-match-data
+              ;; Use dictionary-dependent syntax table
+              (set-syntax-table jinx--syntax-table)
               ;; Ensure that region starts and ends at word boundaries
               (goto-char start)
-              (re-search-backward "[[:blank:]]\\|^")
+              (re-search-backward "\\s-\\|^")
               (setq start (match-end 0))
               (goto-char end)
-              (re-search-forward "[[:blank:]]\\|$")
+              (re-search-forward "\\s-\\|$")
               (setq end (match-beginning 0))
               (jinx--delete-overlays start end)
-              ;; Use dictionary-dependent syntax table
-              (set-syntax-table jinx--syntax-table)
               (goto-char start)
               (while (re-search-forward "\\<\\w+\\>" end t)
                 (let ((word-start (match-beginning 0))
@@ -381,8 +381,8 @@ Return updated END position."
                     (pcase (run-hook-with-args-until-success 'jinx--predicates 
word-start)
                       ((and (pred integerp) skip) (goto-char (max word-end 
(min end skip))))
                       ('nil (overlay-put (make-overlay word-start word-end) 
'category 'jinx))))))
-              (remove-list-of-text-properties start end '(jinx--pending)))
-            (set-syntax-table jinx--mode-syntax-table)))))
+              (remove-list-of-text-properties start end '(jinx--pending)))))
+      (set-syntax-table jinx--mode-syntax-table)))
   end)
 
 (defun jinx--get-overlays (start end &optional visible)



reply via email to

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