aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-04-20 20:40:41 +0000
committerStefan Monnier2004-04-20 20:40:41 +0000
commitc78633461e9cd1835ebc474242cdbe2e46185c5b (patch)
treefee36a807decd9c593c54a2fcbc4ffa1b80d2f31
parentefb0e677c786c2230b86ed4254794979c6303567 (diff)
downloademacs-c78633461e9cd1835ebc474242cdbe2e46185c5b.tar.gz
emacs-c78633461e9cd1835ebc474242cdbe2e46185c5b.zip
(read-number): Check whether `default' is nil.
-rw-r--r--lisp/subr.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 39a9caa3106..81f774bdc68 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1329,7 +1329,8 @@ Optional DEFAULT is a default password to use instead of empty input."
1329 (while 1329 (while
1330 (progn 1330 (progn
1331 (let ((str (read-from-minibuffer prompt nil nil nil nil 1331 (let ((str (read-from-minibuffer prompt nil nil nil nil
1332 (number-to-string default)))) 1332 (and default
1333 (number-to-string default)))))
1333 (setq n (cond 1334 (setq n (cond
1334 ((zerop (length str)) default) 1335 ((zerop (length str)) default)
1335 ((stringp str) (read str))))) 1336 ((stringp str) (read str)))))