changeset 15961:e26f5c2b75a6

(Fcall_interactively): For `N' and `n', if we don't get a number, try again.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Aug 1996 00:51:51 +0000
parents 12c61b25b7b6
children 37baba8d7fbc
files src/callint.c
diffstat 1 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/callint.c	Thu Aug 29 00:44:05 1996 +0000
+++ b/src/callint.c	Thu Aug 29 00:51:51 1996 +0000
@@ -563,9 +563,27 @@
 	  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;