GNU bug report logs - #14254
24.3; read-number fails to recognize faulty numbers (string-to-number to blame)

Previous Next

Package: emacs;

Reported by: Vitalie Spinu <spinuvit <at> gmail.com>

Date: Wed, 24 Apr 2013 12:53:02 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 14254 <at> debbugs.gnu.org
Subject: bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame)
Date: Wed, 24 Apr 2013 16:48:04 +0200


 >> Andreas Schwab <schwab <at> linux-m68k.org>
 >> on Wed, 24 Apr 2013 16:21:28 +0200 wrote:

 > Vitalie Spinu <spinuvit <at> gmail.com> writes:
 >> 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?

    Vitalie 





This bug report was last modified 12 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.