bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14254: 24.3; read-number fails to recognize faulty numbers (string-t


From: Drew Adams
Subject: bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number toblame)
Date: Wed, 24 Apr 2013 08:13:41 -0700

>  >> Now (string-to-number "junk") returns 0.
> 
>  > It always did, as documented.
> 
> That presumably means that read-number never worked as originally
> expected. The comment in source file says that read-number should be
> used for "n" interactive spec, but "n" spec works as expected, so
> read-number is not used there.
> 
> Wouldn't it be more natural for string-to-number to return nil rather
> than 0 in a non-number case?

See my last reply.  It's not about `string-to-number'.  It's about
`read-number'.  

And no, it has always worked as expected, up through Emacs 24.2.  It was broken
in 24.3, by changing (read str) to (string-to-number str).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]