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: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 14254 <at> debbugs.gnu.org
Subject: bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame)
Date: Tue, 07 May 2013 23:51:01 +0300
> Here's what's going on:
> visargs is used in two different ways, just in order to avoid allocating
> a third array:
> - inside the loop, visargs keeps a representation of the arguments,
>   which is used when the prompt of an argument contains a % (in which
>   case it's passed to `format').

Thanks for the explanation.  So I added visargs[i] for numbers.

IIUC, converting to the string with `Fnumber_to_string'
is not needed, but I still added it for consistency with
other interactive code letters like `Fchar_to_string' for `c'.

Also I don't know what compiler bug is stimulated by passing
args[i] directly, so I just copied code from the code letter `c'.

Now it should work for this test case:

    (defun test (n s)
      (interactive "nNumber: \nsString for %s: "))




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

Previous Next


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