diff options
author | Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br> | 2021-03-24 10:31:31 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-24 10:31:31 +0100 |
commit | 50512e36c72a0b6867743ad6b1db0298a2a124f4 (patch) | |
tree | b2a4dfa89e95b2537e66880b0ee5a43000df059b /lisp/emulation/viper-cmd.el | |
parent | 8d334132456dfcbe5b5c3e59737dbfd0a4ea4c0d (diff) | |
download | emacs-50512e36c72a0b6867743ad6b1db0298a2a124f4.tar.gz |
Replace "(default %s)" with 'format-prompt'
* lisp/cmuscheme.el (scheme-load-file, scheme-compile-file):
* lisp/comint.el (comint-get-source):
* lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer)
(viper-query-replace, viper-read-string-with-history):
* lisp/eshell/esh-mode.el (eshell-find-tag):
* lisp/gnus/gnus-sum.el (gnus-articles-to-read)
(gnus-summary-search-article-forward)
(gnus-summary-search-article-backward):
* lisp/international/mule-cmds.el (set-input-method, toggle-input-method)
(describe-input-method, set-language-environment)
(describe-language-environment):
* lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition):
* lisp/mh-e/mh-letter.el (mh-insert-letter):
* lisp/mh-e/mh-mime.el (mh-display-with-external-viewer)
(mh-mime-save-parts, mh-mh-forward-message)
(mh-mml-query-cryptographic-method, mh-minibuffer-read-type):
* lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range):
* lisp/mh-e/mh-utils.el (mh-prompt-for-folder):
* lisp/progmodes/etags.el (find-tag-tag):
(find-tag-noselect, find-tag, find-tag-other-window)
(find-tag-other-frame, find-tag-regexp):
* lisp/progmodes/idlwave.el (idlwave-find-module):
* lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file):
* lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/xref.el (xref--read-identifier):
(xref-find-definitions, xref-find-definitions-other-window)
(xref-find-definitions-other-frame, xref-find-references):
* lisp/ses.el (ses-read-printer):
(ses-read-cell-printer, ses-read-column-printer)
(ses-read-default-printer, ses-define-local-printer):
* lisp/subr.el (read-number):
* lisp/term.el (term-get-source):
* src/minibuf.c (read-buffer): Remove prompt suffix and
use 'format-prompt'.
* lisp/minibuffer.el (format-prompt): Ignore DEFAULT empty strings
(bug#47286).
Diffstat (limited to 'lisp/emulation/viper-cmd.el')
-rw-r--r-- | lisp/emulation/viper-cmd.el | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 42d6c1eb198..728f790a962 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1786,7 +1786,7 @@ Undo previous insertion and inserts new." (do-not-change-default t)) (setq quote-str (viper-read-string-with-history - "Quote string: " + "Quote string" nil 'viper-quote-region-history ;; FIXME: Use comment-region. @@ -1995,24 +1995,17 @@ problems." #'viper-minibuffer-standard-hook (if (or (not (listp old)) (eq (car old) 'lambda)) (list old) old)))) - (val "") - (padding "") - temp-msg) + (val "")) (setq keymap (or keymap minibuffer-local-map) initial (or initial "") - viper-initial initial - temp-msg (if default - (format "(default %s) " default) - "")) + viper-initial initial) (setq viper-incomplete-ex-cmd nil) - (setq val (read-from-minibuffer prompt - (concat temp-msg initial val padding) - keymap nil history-var)) - (setq minibuffer-setup-hook nil - padding (viper-array-to-string (this-command-keys)) - temp-msg "") + (setq val (read-from-minibuffer (format-prompt prompt default) + nil + keymap nil history-var default)) + (setq minibuffer-setup-hook nil) ;; the following tries to be smart about what to put in history (if (not (string= val (car (symbol-value history-var)))) (push val (symbol-value history-var))) @@ -3825,7 +3818,7 @@ Null string will repeat previous search." (let (buffer buffer-name) (setq buffer-name (funcall viper-read-buffer-function - (format "Kill buffer (%s): " + (format-prompt "Kill buffer" (buffer-name (current-buffer))))) (setq buffer (if (null buffer-name) @@ -4171,8 +4164,8 @@ and regexp replace." (interactive) (let (str) (setq str (viper-read-string-with-history - (if viper-re-query-replace "Query replace regexp: " - "Query replace: ") + (if viper-re-query-replace "Query replace regexp" + "Query replace") nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4187,7 +4180,7 @@ and regexp replace." (query-replace-regexp str (viper-read-string-with-history - (format-message "Query replace regexp `%s' with: " str) + (format-message "Query replace regexp `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4195,7 +4188,7 @@ and regexp replace." (query-replace str (viper-read-string-with-history - (format-message "Query replace `%s' with: " str) + (format-message "Query replace `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default |