# HG changeset patch # User Stefan Monnier # Date 1082493641 0 # Node ID f5cafaedbab06ee0998c349e6e9f3021dbd5cb8b # Parent c4901d9dd86ac7076a4e09c3131bffef60fc10d5 (read-number): Check whether `default' is nil. diff -r c4901d9dd86a -r f5cafaedbab0 lisp/subr.el --- a/lisp/subr.el Tue Apr 20 20:36:43 2004 +0000 +++ b/lisp/subr.el Tue Apr 20 20:40:41 2004 +0000 @@ -1329,7 +1329,8 @@ (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)))))