From f5e52cd3037bfb261c7346ec9f6ca79f9f23eb89 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 23 May 1997 17:34:11 +0000 Subject: [PATCH] (perform-replace): Restore match data after read-event. --- lisp/replace.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/replace.el b/lisp/replace.el index 67c02026352..99e8921a26c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -646,6 +646,9 @@ which will run faster and probably do exactly what you want." (let ((message-log-max nil)) (message message from-string next-replacement)) (setq key (read-event)) + ;; Necessary in case something happens during read-event + ;; that clobbers the match data. + (store-match-data real-match-data) (setq key (vector key)) (setq def (lookup-key map key)) ;; Restore the match data while we process the command. -- 2.39.5