diff options
| author | Basil L. Contovounesios | 2021-01-17 18:56:50 +0000 |
|---|---|---|
| committer | Basil L. Contovounesios | 2021-01-18 17:58:42 +0000 |
| commit | bdb9889f784dc6113a74c259a53cf0623e49ab2d (patch) | |
| tree | 2602f1fa151070d8a08ca89fa98ca9879d66cbd3 | |
| parent | 92144027915bc2fc9c222d87a8e2e5da3df46c82 (diff) | |
| download | emacs-bdb9889f784dc6113a74c259a53cf0623e49ab2d.tar.gz emacs-bdb9889f784dc6113a74c259a53cf0623e49ab2d.zip | |
Use format-prompt in read-regexp.
* lisp/replace.el (read-regexp): Use format-prompt (bug#12443).
| -rw-r--r-- | lisp/replace.el | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index d41dc98a0d9..8f8cbfac542 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -866,13 +866,10 @@ If nil, uses `regexp-history'." | |||
| 866 | ;; Do not automatically add default to the history for empty input. | 866 | ;; Do not automatically add default to the history for empty input. |
| 867 | (history-add-new-input nil) | 867 | (history-add-new-input nil) |
| 868 | (input (read-from-minibuffer | 868 | (input (read-from-minibuffer |
| 869 | (cond ((string-match-p ":[ \t]*\\'" prompt) | 869 | (if (string-match-p ":[ \t]*\\'" prompt) |
| 870 | prompt) | 870 | prompt |
| 871 | ((and default (> (length default) 0)) | 871 | (format-prompt prompt (and (length> default 0) |
| 872 | (format "%s (default %s): " prompt | 872 | (query-replace-descr default)))) |
| 873 | (query-replace-descr default))) | ||
| 874 | (t | ||
| 875 | (format "%s: " prompt))) | ||
| 876 | nil nil nil (or history 'regexp-history) suggestions t))) | 873 | nil nil nil (or history 'regexp-history) suggestions t))) |
| 877 | (if (equal input "") | 874 | (if (equal input "") |
| 878 | ;; Return the default value when the user enters empty input. | 875 | ;; Return the default value when the user enters empty input. |