mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
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).
This commit is contained in:
parent
8d33413245
commit
50512e36c7
21 changed files with 83 additions and 123 deletions
|
|
@ -129,7 +129,7 @@
|
|||
(unless default
|
||||
(setq default (mml-content-disposition type filename)))
|
||||
(let ((disposition (completing-read
|
||||
(format "Disposition (default %s): " default)
|
||||
(format-prompt "Disposition" default)
|
||||
'(("attachment") ("inline") (""))
|
||||
nil t nil nil default)))
|
||||
(if (not (equal disposition ""))
|
||||
|
|
|
|||
|
|
@ -390,10 +390,7 @@ This command leaves the mark before the letter and point after it."
|
|||
(or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur")))
|
||||
(nth 0 (mh-translate-range folder "cur"))))
|
||||
(message
|
||||
(read-string (concat "Message number"
|
||||
(or (and default
|
||||
(format " (default %d): " default))
|
||||
": "))
|
||||
(read-string (format-prompt "Message number" default)
|
||||
nil nil
|
||||
(if (numberp default)
|
||||
(int-to-string default)
|
||||
|
|
|
|||
|
|
@ -259,9 +259,7 @@ usually reads the file \"/etc/mailcap\"."
|
|||
(methods (mapcar (lambda (x) (list (cdr (assoc 'viewer x))))
|
||||
(mailcap-mime-info type 'all)))
|
||||
(def (caar methods))
|
||||
(prompt (format "Viewer%s: " (if def
|
||||
(format " (default %s)" def)
|
||||
"")))
|
||||
(prompt (format-prompt "Viewer" def))
|
||||
(method (completing-read prompt methods nil nil nil nil def))
|
||||
(folder mh-show-folder-buffer)
|
||||
(buffer-read-only nil))
|
||||
|
|
@ -395,9 +393,9 @@ do the work."
|
|||
((and (or prompt
|
||||
(equal t mh-mime-save-parts-default-directory))
|
||||
mh-mime-save-parts-directory)
|
||||
(read-directory-name (format
|
||||
"Store in directory (default %s): "
|
||||
mh-mime-save-parts-directory)
|
||||
(read-directory-name (format-prompt
|
||||
"Store in directory"
|
||||
mh-mime-save-parts-directory)
|
||||
"" mh-mime-save-parts-directory t ""))
|
||||
((stringp mh-mime-save-parts-default-directory)
|
||||
mh-mime-save-parts-default-directory)
|
||||
|
|
@ -1258,11 +1256,7 @@ See also \\[mh-mh-to-mime]."
|
|||
(interactive (list
|
||||
(mml-minibuffer-read-description)
|
||||
(mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
|
||||
(read-string (concat "Messages"
|
||||
(if (numberp mh-sent-from-msg)
|
||||
(format " (default %d): "
|
||||
mh-sent-from-msg)
|
||||
": ")))))
|
||||
(read-string (format-prompt "Messages" mh-sent-from-msg))))
|
||||
(beginning-of-line)
|
||||
(insert "#forw [")
|
||||
(and description
|
||||
|
|
@ -1596,7 +1590,7 @@ the possible security methods (see `mh-mml-method-default')."
|
|||
(if current-prefix-arg
|
||||
(let ((def (or (car mh-mml-cryptographic-method-history)
|
||||
mh-mml-method-default)))
|
||||
(completing-read (format "Method (default %s): " def)
|
||||
(completing-read (format-prompt "Method" def)
|
||||
'(("pgp") ("pgpmime") ("smime"))
|
||||
nil t nil 'mh-mml-cryptographic-method-history def))
|
||||
mh-mml-method-default))
|
||||
|
|
@ -1731,7 +1725,7 @@ Optional argument DEFAULT is returned if a type isn't entered."
|
|||
(type (or (and (not (equal probed-type "application/octet-stream"))
|
||||
probed-type)
|
||||
(completing-read
|
||||
(format "Content type (default %s): " default)
|
||||
(format-prompt "Content type" default)
|
||||
(mapcar #'list (mailcap-mime-types))))))
|
||||
(if (not (equal type ""))
|
||||
type
|
||||
|
|
|
|||
|
|
@ -390,10 +390,7 @@ Prompt with PROMPT, raise an error if the sequence is empty and
|
|||
the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT
|
||||
sequence. A reply of `%' defaults to the first sequence
|
||||
containing the current message."
|
||||
(let* ((input (completing-read (format "%s sequence%s: " prompt
|
||||
(if default
|
||||
(format " (default %s)" default)
|
||||
""))
|
||||
(let* ((input (completing-read (format-prompt "%s sequence" default prompt)
|
||||
(mh-seq-names mh-seq-list)
|
||||
nil nil nil 'mh-sequence-history))
|
||||
(seq (cond ((equal input "%")
|
||||
|
|
@ -646,13 +643,10 @@ should be replaced with:
|
|||
((stringp default) default)
|
||||
((symbolp default) (symbol-name default))))
|
||||
(prompt (cond ((and guess large default)
|
||||
(format "%s (folder has %s messages, default %s)"
|
||||
prompt (car counts) default))
|
||||
((and guess large)
|
||||
(format "%s (folder has %s messages)"
|
||||
prompt (car counts)))
|
||||
(format-prompt "%s (folder has %s messages)"
|
||||
default prompt (car counts)))
|
||||
(default
|
||||
(format "%s (default %s)" prompt default))))
|
||||
(format-prompt prompt default))))
|
||||
(minibuffer-local-completion-map mh-range-completion-map)
|
||||
(seq-list (if (eq folder mh-current-folder)
|
||||
mh-seq-list
|
||||
|
|
@ -662,7 +656,7 @@ should be replaced with:
|
|||
(mh-seq-names seq-list)))
|
||||
(input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq))
|
||||
((and (not ask-flag) (not large)) "all")
|
||||
(t (completing-read (format "%s: " prompt)
|
||||
(t (completing-read prompt
|
||||
'mh-range-completion-function nil nil
|
||||
nil 'mh-range-history default))))
|
||||
msg-list)
|
||||
|
|
|
|||
|
|
@ -757,10 +757,9 @@ function will accept the folder +, which means all folders when
|
|||
used in searching."
|
||||
(if (null default)
|
||||
(setq default ""))
|
||||
(let* ((default-string (cond (default-string (format " (default %s)" default-string))
|
||||
((equal "" default) "")
|
||||
(t (format " (default %s)" default))))
|
||||
(prompt (format "%s folder%s: " prompt default-string))
|
||||
(let* ((default-string (or default-string
|
||||
(if (equal default "") nil default)))
|
||||
(prompt (format-prompt "%s folder" default-string prompt))
|
||||
(mh-current-folder-name mh-current-folder)
|
||||
read-name folder-name)
|
||||
(while (and (setq read-name (mh-folder-completing-read
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue