[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx 03721c0380: jinx--check-region: Move forward or ba
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx 03721c0380: jinx--check-region: Move forward or backward to word boundary |
Date: |
Fri, 14 Apr 2023 08:27:08 -0400 (EDT) |
branch: externals/jinx
commit 03721c03805f87126dcd54174ceeb3b1384e2e37
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
jinx--check-region: Move forward or backward to word boundary
---
jinx.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/jinx.el b/jinx.el
index 8320fd821b..72e1f9f831 100644
--- a/jinx.el
+++ b/jinx.el
@@ -342,11 +342,13 @@ position."
(set-syntax-table jinx--syntax-table)
;; Ensure that region starts and ends at word boundaries
(goto-char start)
- (re-search-backward "\\s-\\|^")
- (setq start (match-end 0))
+ (unless (looking-at-p "\\<")
+ (re-search-backward "\\<\\|^")
+ (setq start (match-beginning 0)))
(goto-char end)
- (re-search-forward "\\s-\\|$")
- (setq end (match-beginning 0))
+ (unless (looking-at-p "\\>")
+ (re-search-forward "\\>\\|$")
+ (setq end (match-beginning 0)))
(jinx--delete-overlays start end)
(goto-char start)
(while (re-search-forward "\\<\\w+\\>" end t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/jinx 03721c0380: jinx--check-region: Move forward or backward to word boundary,
ELPA Syncer <=