aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorJuri Linkov2019-07-05 22:11:34 +0300
committerJuri Linkov2019-07-05 22:11:34 +0300
commitdde0320020429a2d2917895fc0e2f5a24ffe6348 (patch)
tree565e314230e08f4334fc7c484322f1a5d3672270 /lisp/replace.el
parent44f199648b0c986a0ac7608f4e9d803c619ae2d6 (diff)
downloademacs-dde0320020429a2d2917895fc0e2f5a24ffe6348.tar.gz
emacs-dde0320020429a2d2917895fc0e2f5a24ffe6348.zip
* lisp/replace.el (replace-highlight): Add save-match-data (bug#36328)
* lisp/term/tty-colors.el (tty-color-canonicalize): Replace string-match with string-match-p. Thanks to Jayden Navarro <jayden@yugabyte.com> and Alan Mackenzie <acm@muc.de>
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 9d1b7bf747d..db305adfd38 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -2316,7 +2316,11 @@ It is called with three arguments, as if it were
2316 (isearch-forward (not backward)) 2316 (isearch-forward (not backward))
2317 (isearch-other-end match-beg) 2317 (isearch-other-end match-beg)
2318 (isearch-error nil)) 2318 (isearch-error nil))
2319 (isearch-lazy-highlight-new-loop range-beg range-end)))) 2319 (save-match-data
2320 ;; Preserve match-data for perform-replace since
2321 ;; isearch-lazy-highlight-new-loop calls `sit-for' that
2322 ;; does redisplay that might clobber match data (bug#36328).
2323 (isearch-lazy-highlight-new-loop range-beg range-end)))))
2320 2324
2321(defun replace-dehighlight () 2325(defun replace-dehighlight ()
2322 (when replace-overlay 2326 (when replace-overlay