Commit c7863346 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(read-number): Check whether `default' is nil.

parent efb0e677
......@@ -1329,7 +1329,8 @@ Optional DEFAULT is a default password to use instead of empty input."
(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)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment