aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-08-29 00:51:51 +0000
committerRichard M. Stallman1996-08-29 00:51:51 +0000
commitf0490a0bf2ee3707994b6f62b6f9ad501b57099c (patch)
tree72ed3b7669fcec321893a3410c7de70cb4f40e8f /src
parent0819585c7b64be82f7b35d6294c2135132938fa6 (diff)
downloademacs-f0490a0bf2ee3707994b6f62b6f9ad501b57099c.tar.gz
emacs-f0490a0bf2ee3707994b6f62b6f9ad501b57099c.zip
(Fcall_interactively): For `N' and `n',
if we don't get a number, try again.
Diffstat (limited to 'src')
-rw-r--r--src/callint.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/callint.c b/src/callint.c
index 9e9a1f1d0dc..14f34f3b5f6 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -563,9 +563,27 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
563 if (!NILP (prefix_arg)) 563 if (!NILP (prefix_arg))
564 goto have_prefix_arg; 564 goto have_prefix_arg;
565 case 'n': /* Read number from minibuffer. */ 565 case 'n': /* Read number from minibuffer. */
566 do 566 {
567 args[i] = Fread_minibuffer (build_string (callint_message), Qnil); 567 int first = 1;
568 while (! NUMBERP (args[i])); 568 do
569 {
570 Lisp_Object tem;
571 if (! first)
572 {
573 message ("Please enter a number.");
574 sit_for (1, 0, 0, 0);
575 }
576 first = 0;
577
578 tem = Fread_from_minibuffer (build_string (callint_message),
579 Qnil, Qnil, Qnil, Qnil);
580 if (! STRINGP (tem) || XSTRING (tem)->size == 0)
581 args[i] = Qnil;
582 else
583 args[i] = Fread (tem);
584 }
585 while (! NUMBERP (args[i]));
586 }
569 visargs[i] = last_minibuf_string; 587 visargs[i] = last_minibuf_string;
570 break; 588 break;
571 589