summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-23 17:34:11 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-23 17:34:11 +0000
commit8a0c24cbf73bbb25d57517158993c1814011be42 (patch)
tree18aa97bca9f2dd1bc39aeec117e4fcd7b0a3804a /lisp/replace.el
parent6b3771e0f00bccb6d608f0f2054b8f9176d9d80a (diff)
downloademacs-8a0c24cbf73bbb25d57517158993c1814011be42.tar.gz
(perform-replace): Restore match data after read-event.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el3
1 files changed, 3 insertions, 0 deletions
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.