summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-03-18 12:16:08 +0000
committerRoland McGrath <roland@gnu.org>1994-03-18 12:16:08 +0000
commit9e167bd506ec54e7e21d3f6c52a0985cee5abf94 (patch)
tree6103a86e8df5ac2b821299ef7d5d1b302fd70aa1 /lisp/replace.el
parent68b9cce23b42c6c6b329254409507a6d8aa24450 (diff)
downloademacs-9e167bd506ec54e7e21d3f6c52a0985cee5abf94.tar.gz
(perform-replace): Set match-data markers to nil before discarding them.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index ab7f2b13ced..eeb0e0951db 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,6 +1,6 @@
;;; replace.el --- replace commands for Emacs.
-;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -573,10 +573,10 @@ which will run faster and probably do exactly what you want."
(setq stack
(cons (cons (point)
(or replaced
- (mapcar
- (function (lambda (elt)
- (and elt
- (marker-position elt))))
+ (mapcar (lambda (elt)
+ (and elt
+ (prog1 (marker-position elt)
+ (set-marker elt nil))))
(match-data))))
stack))
(if replaced (setq replace-count (1+ replace-count)))))