changeset 18944:e7a1ad118598

(read_char): Delete spurious UNGCPRO. Add UNGCPRO before the longjmps to wrong_kboard_jmpbuf. Initialize c before the GCPRO1.
author Richard M. Stallman <rms@gnu.org>
date Thu, 24 Jul 1997 16:45:55 +0000
parents 158d4f0bc094
children 7f491075707a
files src/keyboard.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Thu Jul 24 16:33:00 1997 +0000
+++ b/src/keyboard.c	Thu Jul 24 16:45:55 1997 +0000
@@ -1711,6 +1711,7 @@
 
   before_command_key_count = this_command_key_count;
   before_command_echo_length = echo_length ();
+  c = Qnil;
 
   GCPRO1 (c);
 
@@ -1865,6 +1866,9 @@
 	    *tailp = Fcons (c, Qnil);
 	    kb->kbd_queue_has_data = 1;
 	    current_kboard = kb;
+	    /* This is going to exit from read_char
+	       so we had better get rid of this frame's stuff.  */
+	    UNGCPRO;
 	    longjmp (wrong_kboard_jmpbuf, 1);
 	  }
       }
@@ -2030,6 +2034,9 @@
 	if (kb->kbd_queue_has_data)
 	  {
 	    current_kboard = kb;
+	    /* This is going to exit from read_char
+	       so we had better get rid of this frame's stuff.  */
+	    UNGCPRO;
 	    longjmp (wrong_kboard_jmpbuf, 1);
 	  }
     }
@@ -2067,6 +2074,9 @@
 	  if (single_kboard)
 	    goto wrong_kboard;
 	  current_kboard = kb;
+	  /* This is going to exit from read_char
+	     so we had better get rid of this frame's stuff.  */
+	  UNGCPRO;
 	  longjmp (wrong_kboard_jmpbuf, 1);
 	}
 #endif
@@ -2191,8 +2201,6 @@
   if (! NILP (also_record))
     record_char (also_record);
 
-  UNGCPRO;
-
  from_macro:
  reread_first: