changeset 55008:f5cafaedbab0

(read-number): Check whether `default' is nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 20 Apr 2004 20:40:41 +0000
parents c4901d9dd86a
children 10f2535aa14e
files lisp/subr.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)))))