summaryrefslogtreecommitdiff
path: root/src/callint.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-08-29 00:51:51 +0000
committerRichard M. Stallman <rms@gnu.org>1996-08-29 00:51:51 +0000
commitfdfea67543fb5e8175bf7bdba08ade134feaf79e (patch)
tree4b6d42cee428f8271843c3dae5f2c79a41f160d8 /src/callint.c
parent0849a3e268840268eea35bfb03f207f84f717bd3 (diff)
downloademacs-fdfea67543fb5e8175bf7bdba08ade134feaf79e.tar.gz
(Fcall_interactively): For `N' and `n',
if we don't get a number, try again.
Diffstat (limited to 'src/callint.c')
-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.")
if (!NILP (prefix_arg))
goto have_prefix_arg;
case 'n': /* Read number from minibuffer. */
- do
- args[i] = Fread_minibuffer (build_string (callint_message), Qnil);
- while (! NUMBERP (args[i]));
+ {
+ int first = 1;
+ do
+ {
+ Lisp_Object tem;
+ if (! first)
+ {
+ message ("Please enter a number.");
+ sit_for (1, 0, 0, 0);
+ }
+ first = 0;
+
+ tem = Fread_from_minibuffer (build_string (callint_message),
+ Qnil, Qnil, Qnil, Qnil);
+ if (! STRINGP (tem) || XSTRING (tem)->size == 0)
+ args[i] = Qnil;
+ else
+ args[i] = Fread (tem);
+ }
+ while (! NUMBERP (args[i]));
+ }
visargs[i] = last_minibuf_string;
break;