Subject: Re: bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame)

From: Juri Linkov <[email-masked]>
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: "))