# HG changeset patch # User Karl Heuer # Date 905442473 0 # Node ID f16c9643567784551586fa9ae98cc5138ab964cc # Parent 17a79bc7bfe132a2fb4c464c1b7088b951cba4aa (command_loop_1): When switching to selected window's bfr, first exit if selected frame is dead (no live frames remain). (read_key_sequence): Likewise. diff -r 17a79bc7bfe1 -r f16c96435677 src/keyboard.c --- a/src/keyboard.c Thu Sep 10 15:46:18 1998 +0000 +++ b/src/keyboard.c Thu Sep 10 15:47:53 1998 +0000 @@ -1200,6 +1200,9 @@ while (1) { + if (! FRAME_LIVE_P (selected_frame)) + Fkill_emacs (Qnil); + /* Make sure the current window's buffer is selected. */ if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); @@ -1271,6 +1274,8 @@ Qnil, 0, 1, 1); /* A filter may have run while we were reading the input. */ + if (! FRAME_LIVE_P (selected_frame)) + Fkill_emacs (Qnil); if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); @@ -6993,8 +6998,12 @@ This is to be more consistent with the behavior of the command_loop_1. */ if (fix_current_buffer) - if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) - Fset_buffer (XWINDOW (selected_window)->buffer); + { + if (! FRAME_LIVE_P (selected_frame)) + Fkill_emacs (Qnil); + if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) + Fset_buffer (XWINDOW (selected_window)->buffer); + } orig_local_map = get_local_map (PT, current_buffer); goto replay_sequence; @@ -7092,6 +7101,8 @@ emacsclient). */ record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + if (! FRAME_LIVE_P (selected_frame)) + Fkill_emacs (Qnil); set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); orig_local_map = get_local_map (PT, current_buffer); goto replay_sequence;