From: Richard M. Stallman Date: Thu, 24 Jul 1997 16:45:55 +0000 (+0000) Subject: (read_char): Delete spurious UNGCPRO. X-Git-Tag: emacs-20.1~1002 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef6661f7767c113ab8db7ce6f804ed97023be4bc;p=emacs.git (read_char): Delete spurious UNGCPRO. Add UNGCPRO before the longjmps to wrong_kboard_jmpbuf. Initialize c before the GCPRO1. --- diff --git a/src/keyboard.c b/src/keyboard.c index 6c068dfd043..39629ae463a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1711,6 +1711,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) before_command_key_count = this_command_key_count; before_command_echo_length = echo_length (); + c = Qnil; GCPRO1 (c); @@ -1865,6 +1866,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) *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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) 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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) 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 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (! NILP (also_record)) record_char (also_record); - UNGCPRO; - from_macro: reread_first: