Commit eab69997 authored by Roland McGrath's avatar Roland McGrath
Browse files

(perform-replace): Set match-data markers to nil before discarding them.

parent c5068ec5
;;; 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
(function (lambda (elt)
(and elt
(marker-position elt))))
(mapcar (lambda (elt)
(and elt
(prog1 (marker-position elt)
(set-marker elt nil))))
(if replaced (setq replace-count (1+ replace-count)))))
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