[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bdb9889 1/2: Use format-prompt in read-regexp.
From: |
Basil L. Contovounesios |
Subject: |
master bdb9889 1/2: Use format-prompt in read-regexp. |
Date: |
Mon, 18 Jan 2021 13:04:14 -0500 (EST) |
branch: master
commit bdb9889f784dc6113a74c259a53cf0623e49ab2d
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Use format-prompt in read-regexp.
* lisp/replace.el (read-regexp): Use format-prompt (bug#12443).
---
lisp/replace.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/lisp/replace.el b/lisp/replace.el
index d41dc98..8f8cbfa 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -866,13 +866,10 @@ If nil, uses `regexp-history'."
;; Do not automatically add default to the history for empty input.
(history-add-new-input nil)
(input (read-from-minibuffer
- (cond ((string-match-p ":[ \t]*\\'" prompt)
- prompt)
- ((and default (> (length default) 0))
- (format "%s (default %s): " prompt
- (query-replace-descr default)))
- (t
- (format "%s: " prompt)))
+ (if (string-match-p ":[ \t]*\\'" prompt)
+ prompt
+ (format-prompt prompt (and (length> default 0)
+ (query-replace-descr default))))
nil nil nil (or history 'regexp-history) suggestions t)))
(if (equal input "")
;; Return the default value when the user enters empty input.