Mercurial > emacs
diff lisp/replace.el @ 60174:85f04f438e03
(query-replace, query-replace-regexp)
(replace-string, replace-regexp): When operating on region, make
the minibuffer prompt say so.
| author | Dan Nicolaescu <dann@ics.uci.edu> |
|---|---|
| date | Sat, 19 Feb 2005 21:08:43 +0000 |
| parents | 0527991ebdf0 |
| children | 4d79094ee455 bf0d492ea2d5 |
line wrap: on
line diff
--- a/lisp/replace.el Sat Feb 19 20:52:47 2005 +0000 +++ b/lisp/replace.el Sat Feb 19 21:08:43 2005 +0000 @@ -217,7 +217,11 @@ To customize possible responses, change the \"bindings\" in `query-replace-map'." (interactive (let ((common - (query-replace-read-args "Query replace" nil))) + (query-replace-read-args + (if (and transient-mark-mode mark-active) + "Query replace in region" + "Query replace") + nil))) (list (nth 0 common) (nth 1 common) (nth 2 common) ;; These are done separately here ;; so that command-history will record these expressions @@ -277,7 +281,11 @@ Use \\[repeat-complex-command] after this command for details." (interactive (let ((common - (query-replace-read-args "Query replace regexp" t))) + (query-replace-read-args + (if (and transient-mark-mode mark-active) + "Query replace regexp in region" + "Query replace regexp") + t))) (list (nth 0 common) (nth 1 common) (nth 2 common) ;; These are done separately here ;; so that command-history will record these expressions @@ -423,7 +431,11 @@ and TO-STRING is also null.)" (interactive (let ((common - (query-replace-read-args "Replace string" nil))) + (query-replace-read-args + (if (and transient-mark-mode mark-active) + "Replace string in region" + "Replace string") + nil))) (list (nth 0 common) (nth 1 common) (nth 2 common) (if (and transient-mark-mode mark-active) (region-beginning)) @@ -477,7 +489,11 @@ which will run faster and will not set the mark or print anything." (interactive (let ((common - (query-replace-read-args "Replace regexp" t))) + (query-replace-read-args + (if (and transient-mark-mode mark-active) + "Replace regexp in region" + "Replace regexp") + t))) (list (nth 0 common) (nth 1 common) (nth 2 common) (if (and transient-mark-mode mark-active) (region-beginning))
