1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* 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>
This commit is contained in:
Juri Linkov 2019-07-05 22:11:34 +03:00
parent 44f199648b
commit dde0320020
2 changed files with 6 additions and 2 deletions

View file

@ -2316,7 +2316,11 @@ It is called with three arguments, as if it were
(isearch-forward (not backward))
(isearch-other-end match-beg)
(isearch-error nil))
(isearch-lazy-highlight-new-loop range-beg range-end))))
(save-match-data
;; Preserve match-data for perform-replace since
;; isearch-lazy-highlight-new-loop calls `sit-for' that
;; does redisplay that might clobber match data (bug#36328).
(isearch-lazy-highlight-new-loop range-beg range-end)))))
(defun replace-dehighlight ()
(when replace-overlay