From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14254@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 11:42:41 +0300 [thread overview]
Message-ID: <877gjbgozi.fsf@mail.jurta.org> (raw)
In-Reply-To: <87ppxi49xd.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 25 Apr 2013 23:44:45 +0300")
>>> `call-interactively' doesn't use `read-number'. It duplicates code
>>> from `read-number' with a similar loop to re-read non-numbers.
>>
>> Could you try and see if/how the C code could be changed to just call
>> the Elisp function?
>
> === modified file 'src/callint.c'
> --- src/callint.c 2013-02-27 07:42:43 +0000
> +++ src/callint.c 2013-04-25 20:41:12 +0000
> [...]
> - visargs[i] = args[i];
> + args[i] = call1 (Qread_number, callint_message);
> break;
I should have mentioned that original code contained the line
visargs[i] = args[i];
but I omitted it in the change since it has no effect
because this code at the end of `Fcall_interactively'
for (i = 1; i < nargs; i++)
{
if (varies[i] > 0)
visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil);
else
visargs[i] = quotify_arg (args[i]);
}
overwrites elements of `visargs' anyway. I don't understand why
`Fcall_interactively' contains many lines of such useless code as
visargs[i] = last_minibuf_string;
If the intention was to collect strings in `visargs' and use them later
then old code for numbers (currently still useless) was wrong,
it should convert numbers to strings with something like
visargs[i] = Fnumber_to_string(args[i]);
next prev parent reply other threads:[~2013-05-07 8:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 12:46 bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame) Vitalie Spinu
2013-04-24 13:09 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number toblame) Drew Adams
2013-04-24 14:21 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame) Andreas Schwab
2013-04-24 14:44 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number toblame) Drew Adams
2013-04-24 14:48 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame) Vitalie Spinu
2013-04-24 15:13 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number toblame) Drew Adams
2013-04-24 17:29 ` bug#14254: 24.3; read-number fails to recognize faulty numbers (string-to-number to blame) Glenn Morris
2013-04-24 20:57 ` Juri Linkov
2013-04-25 3:33 ` Stefan Monnier
2013-04-25 20:44 ` Juri Linkov
2013-04-26 1:46 ` Stefan Monnier
2013-05-07 8:42 ` Juri Linkov [this message]
2013-05-07 13:38 ` Stefan Monnier
2013-05-07 20:51 ` Juri Linkov
2013-05-07 21:31 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gjbgozi.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=14254@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.