]> code.delx.au - gnu-emacs/commitdiff
(perform-replace): Set match-data markers to nil before discarding them.
authorRoland McGrath <roland@gnu.org>
Fri, 18 Mar 1994 12:16:08 +0000 (12:16 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 18 Mar 1994 12:16:08 +0000 (12:16 +0000)
lisp/replace.el

index ab7f2b13ced2c9f2cfbb78f3c47e620455d2d6f0..eeb0e0951db7ed39d036b8329de21c671291ef6f 100644 (file)
@@ -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)))))