Commit 10ddc30e authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(replace-match-data): Pass RESEAT arg `t' to

match-data to unchain markers in match-data.
parent 7df73b0d
...@@ -217,7 +217,7 @@ Fourth and fifth arg START and END specify the region to operate on. ...@@ -217,7 +217,7 @@ Fourth and fifth arg START and END specify the region to operate on.
To customize possible responses, change the \"bindings\" in `query-replace-map'." To customize possible responses, change the \"bindings\" in `query-replace-map'."
(interactive (let ((common (interactive (let ((common
(query-replace-read-args (query-replace-read-args
(if (and transient-mark-mode mark-active) (if (and transient-mark-mode mark-active)
"Query replace in region" "Query replace in region"
"Query replace") "Query replace")
...@@ -281,7 +281,7 @@ text, TO-STRING is actually made a list instead of a string. ...@@ -281,7 +281,7 @@ text, TO-STRING is actually made a list instead of a string.
Use \\[repeat-complex-command] after this command for details." Use \\[repeat-complex-command] after this command for details."
(interactive (interactive
(let ((common (let ((common
(query-replace-read-args (query-replace-read-args
(if (and transient-mark-mode mark-active) (if (and transient-mark-mode mark-active)
"Query replace regexp in region" "Query replace regexp in region"
"Query replace regexp") "Query replace regexp")
...@@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything. ...@@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything.
and TO-STRING is also null.)" and TO-STRING is also null.)"
(interactive (interactive
(let ((common (let ((common
(query-replace-read-args (query-replace-read-args
(if (and transient-mark-mode mark-active) (if (and transient-mark-mode mark-active)
"Replace string in region" "Replace string in region"
"Replace string") "Replace string")
...@@ -489,10 +489,10 @@ What you probably want is a loop like this: ...@@ -489,10 +489,10 @@ What you probably want is a loop like this:
which will run faster and will not set the mark or print anything." which will run faster and will not set the mark or print anything."
(interactive (interactive
(let ((common (let ((common
(query-replace-read-args (query-replace-read-args
(if (and transient-mark-mode mark-active) (if (and transient-mark-mode mark-active)
"Replace regexp in region" "Replace regexp in region"
"Replace regexp") "Replace regexp")
t))) t)))
(list (nth 0 common) (nth 1 common) (nth 2 common) (list (nth 0 common) (nth 1 common) (nth 2 common)
(if (and transient-mark-mode mark-active) (if (and transient-mark-mode mark-active)
...@@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS." ...@@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS."
(and (eq new reuse) (and (eq new reuse)
(eq (null integers) (markerp (car reuse))) (eq (null integers) (markerp (car reuse)))
new))) new)))
(match-data integers (match-data integers reuse t)))
(prog1 reuse
(while reuse
(if (markerp (car reuse))
(set-marker (car reuse) nil))
(setq reuse (cdr reuse)))))))
(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data)
"Make a replacement with `replace-match', editing `\\?'. "Make a replacement with `replace-match', editing `\\?'.
......
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