]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-number): Check whether `default' is nil.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Apr 2004 20:40:41 +0000 (20:40 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 20 Apr 2004 20:40:41 +0000 (20:40 +0000)
lisp/subr.el

index 39a9caa3106a36e5d4eb9752e6a6387831140416..81f774bdc68b3bcc6ad0bbf3a2f5bde7c8494e99 100644 (file)
@@ -1329,7 +1329,8 @@ Optional DEFAULT is a default password to use instead of empty input."
     (while
        (progn
          (let ((str (read-from-minibuffer prompt nil nil nil nil
-                                          (number-to-string default))))
+                                          (and default
+                                               (number-to-string default)))))
            (setq n (cond
                     ((zerop (length str)) default)
                     ((stringp str) (read str)))))