aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorDan Nicolaescu2005-02-19 21:08:43 +0000
committerDan Nicolaescu2005-02-19 21:08:43 +0000
commitf79bdb3aa2f26d28e775af39417981c6dcb0484c (patch)
treed1d66a8578e15227737eac6f99e8ffe5ab387370 /lisp/replace.el
parentac010fca5192aeb71130912c40779285f13c73e7 (diff)
downloademacs-f79bdb3aa2f26d28e775af39417981c6dcb0484c.tar.gz
emacs-f79bdb3aa2f26d28e775af39417981c6dcb0484c.zip
(query-replace, query-replace-regexp)
(replace-string, replace-regexp): When operating on region, make the minibuffer prompt say so.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el24
1 files changed, 20 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index eb9f592f01d..2c60cd006f1 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -217,7 +217,11 @@ Fourth and fifth arg START and END specify the region to operate on.
217 217
218To customize possible responses, change the \"bindings\" in `query-replace-map'." 218To customize possible responses, change the \"bindings\" in `query-replace-map'."
219 (interactive (let ((common 219 (interactive (let ((common
220 (query-replace-read-args "Query replace" nil))) 220 (query-replace-read-args
221 (if (and transient-mark-mode mark-active)
222 "Query replace in region"
223 "Query replace")
224 nil)))
221 (list (nth 0 common) (nth 1 common) (nth 2 common) 225 (list (nth 0 common) (nth 1 common) (nth 2 common)
222 ;; These are done separately here 226 ;; These are done separately here
223 ;; so that command-history will record these expressions 227 ;; so that command-history will record these expressions
@@ -277,7 +281,11 @@ text, TO-STRING is actually made a list instead of a string.
277Use \\[repeat-complex-command] after this command for details." 281Use \\[repeat-complex-command] after this command for details."
278 (interactive 282 (interactive
279 (let ((common 283 (let ((common
280 (query-replace-read-args "Query replace regexp" t))) 284 (query-replace-read-args
285 (if (and transient-mark-mode mark-active)
286 "Query replace regexp in region"
287 "Query replace regexp")
288 t)))
281 (list (nth 0 common) (nth 1 common) (nth 2 common) 289 (list (nth 0 common) (nth 1 common) (nth 2 common)
282 ;; These are done separately here 290 ;; These are done separately here
283 ;; so that command-history will record these expressions 291 ;; so that command-history will record these expressions
@@ -423,7 +431,11 @@ which will run faster and will not set the mark or print anything.
423and TO-STRING is also null.)" 431and TO-STRING is also null.)"
424 (interactive 432 (interactive
425 (let ((common 433 (let ((common
426 (query-replace-read-args "Replace string" nil))) 434 (query-replace-read-args
435 (if (and transient-mark-mode mark-active)
436 "Replace string in region"
437 "Replace string")
438 nil)))
427 (list (nth 0 common) (nth 1 common) (nth 2 common) 439 (list (nth 0 common) (nth 1 common) (nth 2 common)
428 (if (and transient-mark-mode mark-active) 440 (if (and transient-mark-mode mark-active)
429 (region-beginning)) 441 (region-beginning))
@@ -477,7 +489,11 @@ What you probably want is a loop like this:
477which will run faster and will not set the mark or print anything." 489which will run faster and will not set the mark or print anything."
478 (interactive 490 (interactive
479 (let ((common 491 (let ((common
480 (query-replace-read-args "Replace regexp" t))) 492 (query-replace-read-args
493 (if (and transient-mark-mode mark-active)
494 "Replace regexp in region"
495 "Replace regexp")
496 t)))
481 (list (nth 0 common) (nth 1 common) (nth 2 common) 497 (list (nth 0 common) (nth 1 common) (nth 2 common)
482 (if (and transient-mark-mode mark-active) 498 (if (and transient-mark-mode mark-active)
483 (region-beginning)) 499 (region-beginning))