aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorMiles Bader2004-06-02 22:44:45 +0000
committerMiles Bader2004-06-02 22:44:45 +0000
commit2d14d61e162b7e7d8d8515ccc40bb97a4edf433e (patch)
treee324ffe1ad0717cd9c23fc88fc64c8fc4bbbf450 /lisp/subr.el
parent2bb680b0aad6791a449ef8f07d5c1d5c1e8b39c4 (diff)
downloademacs-2d14d61e162b7e7d8d8515ccc40bb97a4edf433e.tar.gz
emacs-2d14d61e162b7e7d8d8515ccc40bb97a4edf433e.zip
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.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index b90efd46ff0..e4e38d906c6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1335,9 +1335,11 @@ Optional DEFAULT is a default password to use instead of empty input."
1335 (let ((n nil)) 1335 (let ((n nil))
1336 (when default 1336 (when default
1337 (setq prompt 1337 (setq prompt
1338 (if (string-match "\\(\\):[^:]*" prompt) 1338 (if (string-match "\\(\\):[ \t]*\\'" prompt)
1339 (replace-match (format " [%s]" default) t t prompt 1) 1339 (replace-match (format " (default %s)" default) t t prompt 1)
1340 (concat prompt (format " [%s] " default))))) 1340 (replace-regexp-in-string "[ \t]*\\'"
1341 (format " (default %s) " default)
1342 prompt t t))))
1341 (while 1343 (while
1342 (progn 1344 (progn
1343 (let ((str (read-from-minibuffer prompt nil nil nil nil 1345 (let ((str (read-from-minibuffer prompt nil nil nil nil