summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-01 22:56:54 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-01 22:56:54 +0000
commit0a03acce53f6a4293169f279389fd9a44d7758cc (patch)
tree086ab46dddbabf83b280a8f5692e56d54e40998a /lisp/replace.el
parentff4db5a4b126ad8e8bf800658113f97f61d76be8 (diff)
downloademacs-0a03acce53f6a4293169f279389fd9a44d7758cc.tar.gz
(perform-replace): Call substitute-command-keys just once
and only if querying.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index d51be301266..65818667ede 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -467,7 +467,11 @@ which will run faster and probably do exactly what you want."
(next-rotate-count 0)
(replace-count 0)
(lastrepl nil) ;Position after last match considered.
- (match-again t))
+ (match-again t)
+ (message
+ (if query-flag
+ (substitute-command-keys
+ "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) "))))
(if (stringp replacements)
(setq next-replacement replacements)
(or repeat-count (setq repeat-count 1)))
@@ -525,9 +529,7 @@ which will run faster and probably do exactly what you want."
;; which means it has finished handling this occurrence.
(while (not done)
(replace-highlight (match-beginning 0) (match-end 0))
- (message (substitute-command-keys
- "Query replacing %s with %s: (\\<query-replace-map>\\[help] for help) ")
- from-string next-replacement)
+ (message message from-string next-replacement)
(setq key (read-event))
(setq key (vector key))
(setq def (lookup-key map key))