Commit dde03200 authored by Juri Linkov's avatar Juri Linkov

* 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>
parent 44f19964
Pipeline #2248 failed with stage
in 52 minutes and 27 seconds
......@@ -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
......
......@@ -820,7 +820,7 @@ Value is the modified color alist for FRAME."
"Return COLOR in canonical form.
A canonicalized color name is all-lower case, with any blanks removed."
(let ((case-fold-search nil))
(if (string-match "[A-Z ]" color)
(if (string-match-p "[A-Z ]" color)
(replace-regexp-in-string " +" "" (downcase color))
color)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment