GNU bug report logs -
#14254
24.3; read-number fails to recognize faulty numbers (string-to-number to blame)
Previous Next
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
> 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.