[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e061999: * lisp/isearch.el: Add save-match-data for funcall isear
From: |
Juri Linkov |
Subject: |
master e061999: * lisp/isearch.el: Add save-match-data for funcall isearch-filter-predicate. |
Date: |
Tue, 13 Jul 2021 18:30:14 -0400 (EDT) |
branch: master
commit e0619995594d1686afd0493391417d6f900d632c
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/isearch.el: Add save-match-data for funcall isearch-filter-predicate.
* lisp/isearch.el (isearch-search): Add save-match-data before
funcall isearch-filter-predicate.
(isearch-lazy-highlight-search): Add save-match-data before
funcall isearch-filter-predicate.
(Bug#49534)
---
lisp/isearch.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index d1b9f2c..4bc5956 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3529,8 +3529,9 @@ Optional third argument, if t, means if fail just return
nil (no error).
;; Clear RETRY unless the search predicate says
;; to skip this search hit.
(if (or (not isearch-success)
- (funcall isearch-filter-predicate
- (match-beginning 0) (match-end 0)))
+ (save-match-data
+ (funcall isearch-filter-predicate
+ (match-beginning 0) (match-end 0))))
(setq retry nil)
;; Advance point on empty matches before retrying
(when (= (match-beginning 0) (match-end 0))
@@ -4048,8 +4049,9 @@ Attempt to do the search exactly the way the pending
Isearch would."
;; to skip this search hit.
(if (or (not success)
(= (match-beginning 0) (match-end 0))
- (funcall isearch-filter-predicate
- (match-beginning 0) (match-end 0)))
+ (save-match-data
+ (funcall isearch-filter-predicate
+ (match-beginning 0) (match-end 0))))
(setq retry nil)))
success)
(error nil)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e061999: * lisp/isearch.el: Add save-match-data for funcall isearch-filter-predicate.,
Juri Linkov <=