mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-12 18:55:13 -08:00
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-363
(read-number): Use canonical format for default in prompt. 2004-06-03 Miles Bader <miles@gnu.org> * lisp/subr.el (read-number): Use canonical format for default in prompt.
This commit is contained in:
parent
2bb680b0aa
commit
2d14d61e16
2 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
2004-06-03 Miles Bader <miles@gnu.org>
|
||||
|
||||
* subr.el (read-number): Use canonical format for default in prompt.
|
||||
|
||||
* minibuf-eldef.el (minibuffer-default-in-prompt-regexps): Add
|
||||
regexp for " [...]" style defaults.
|
||||
|
||||
|
|
|
|||
|
|
@ -1335,9 +1335,11 @@ Optional DEFAULT is a default password to use instead of empty input."
|
|||
(let ((n nil))
|
||||
(when default
|
||||
(setq prompt
|
||||
(if (string-match "\\(\\):[^:]*" prompt)
|
||||
(replace-match (format " [%s]" default) t t prompt 1)
|
||||
(concat prompt (format " [%s] " default)))))
|
||||
(if (string-match "\\(\\):[ \t]*\\'" prompt)
|
||||
(replace-match (format " (default %s)" default) t t prompt 1)
|
||||
(replace-regexp-in-string "[ \t]*\\'"
|
||||
(format " (default %s) " default)
|
||||
prompt t t))))
|
||||
(while
|
||||
(progn
|
||||
(let ((str (read-from-minibuffer prompt nil nil nil nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue