From: Richard M. Stallman Date: Fri, 23 May 1997 17:34:11 +0000 (+0000) Subject: (perform-replace): Restore match data after read-event. X-Git-Tag: emacs-20.1~2012 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5e52cd3037bfb261c7346ec9f6ca79f9f23eb89;p=emacs.git (perform-replace): Restore match data after read-event. --- 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.