summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2005-06-08 22:37:13 +0000
committerKim F. Storm <storm@cua.dk>2005-06-08 22:37:13 +0000
commit10ddc30eee98ce9af97d0b78021dd5bcf9192413 (patch)
tree89d670e0ee336df8f8b637cc84617a435db8ec8d /lisp/replace.el
parent7df73b0d1e96ec0273f94b0ab71756d404aee042 (diff)
downloademacs-10ddc30eee98ce9af97d0b78021dd5bcf9192413.tar.gz
(replace-match-data): Pass RESEAT arg `t' to
match-data to unchain markers in match-data.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el19
1 files changed, 7 insertions, 12 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index ba3d5fcfbf4..d5ccd8723c2 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -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'."
(interactive (let ((common
- (query-replace-read-args
+ (query-replace-read-args
(if (and transient-mark-mode mark-active)
"Query replace in region"
"Query replace")
@@ -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."
(interactive
(let ((common
- (query-replace-read-args
+ (query-replace-read-args
(if (and transient-mark-mode mark-active)
"Query replace regexp in region"
"Query replace regexp")
@@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything.
and TO-STRING is also null.)"
(interactive
(let ((common
- (query-replace-read-args
+ (query-replace-read-args
(if (and transient-mark-mode mark-active)
"Replace string in region"
"Replace string")
@@ -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."
(interactive
(let ((common
- (query-replace-read-args
+ (query-replace-read-args
(if (and transient-mark-mode mark-active)
- "Replace regexp in region"
- "Replace regexp")
+ "Replace regexp in region"
+ "Replace regexp")
t)))
(list (nth 0 common) (nth 1 common) (nth 2 common)
(if (and transient-mark-mode mark-active)
@@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS."
(and (eq new reuse)
(eq (null integers) (markerp (car reuse)))
new)))
- (match-data integers
- (prog1 reuse
- (while reuse
- (if (markerp (car reuse))
- (set-marker (car reuse) nil))
- (setq reuse (cdr reuse)))))))
+ (match-data integers reuse t)))
(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data)
"Make a replacement with `replace-match', editing `\\?'.