# HG changeset patch # User Roland McGrath # Date 763992968 0 # Node ID 3989978f6631c094237749477a625a34c719aca8 # Parent 2f1e5e14dc25c6e8e846c9e3787d0ede2cc26cb3 (perform-replace): Set match-data markers to nil before discarding them. diff -r 2f1e5e14dc25 -r 3989978f6631 lisp/replace.el --- a/lisp/replace.el Fri Mar 18 11:54:24 1994 +0000 +++ b/lisp/replace.el Fri Mar 18 12:16:08 1994 +0000 @@ -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 @@ (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)))))