]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fcall_interactively): For `N' and `n',
authorRichard M. Stallman <rms@gnu.org>
Thu, 29 Aug 1996 00:51:51 +0000 (00:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 29 Aug 1996 00:51:51 +0000 (00:51 +0000)
if we don't get a number, try again.

src/callint.c

index 9e9a1f1d0dc6e3bd664710cd5b7742a9e82372c1..14f34f3b5f604d5f64a5d284c2dd01f7125e5858 100644 (file)
@@ -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;