diff options
| author | Karl Heuer | 1998-09-10 15:47:53 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-09-10 15:47:53 +0000 |
| commit | a94a4335903f2744e910d39f7e95ace77c47210d (patch) | |
| tree | 76e82f829f1d6b664f99415f69f323d93ca13280 /src | |
| parent | 23a3356234fc8b978e5be2fbc30625a905aecfc3 (diff) | |
| download | emacs-a94a4335903f2744e910d39f7e95ace77c47210d.tar.gz emacs-a94a4335903f2744e910d39f7e95ace77c47210d.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 4d37ea3372c..9f1915b0bb1 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1200,6 +1200,9 @@ command_loop_1 () | |||
| 1200 | 1200 | ||
| 1201 | while (1) | 1201 | while (1) |
| 1202 | { | 1202 | { |
| 1203 | if (! FRAME_LIVE_P (selected_frame)) | ||
| 1204 | Fkill_emacs (Qnil); | ||
| 1205 | |||
| 1203 | /* Make sure the current window's buffer is selected. */ | 1206 | /* Make sure the current window's buffer is selected. */ |
| 1204 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 1207 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 1205 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); | 1208 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); |
| @@ -1271,6 +1274,8 @@ command_loop_1 () | |||
| 1271 | Qnil, 0, 1, 1); | 1274 | Qnil, 0, 1, 1); |
| 1272 | 1275 | ||
| 1273 | /* A filter may have run while we were reading the input. */ | 1276 | /* A filter may have run while we were reading the input. */ |
| 1277 | if (! FRAME_LIVE_P (selected_frame)) | ||
| 1278 | Fkill_emacs (Qnil); | ||
| 1274 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 1279 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 1275 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); | 1280 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); |
| 1276 | 1281 | ||
| @@ -6993,8 +6998,12 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 6993 | This is to be more consistent with the behavior | 6998 | This is to be more consistent with the behavior |
| 6994 | of the command_loop_1. */ | 6999 | of the command_loop_1. */ |
| 6995 | if (fix_current_buffer) | 7000 | if (fix_current_buffer) |
| 6996 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 7001 | { |
| 6997 | Fset_buffer (XWINDOW (selected_window)->buffer); | 7002 | if (! FRAME_LIVE_P (selected_frame)) |
| 7003 | Fkill_emacs (Qnil); | ||
| 7004 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | ||
| 7005 | Fset_buffer (XWINDOW (selected_window)->buffer); | ||
| 7006 | } | ||
| 6998 | 7007 | ||
| 6999 | orig_local_map = get_local_map (PT, current_buffer); | 7008 | orig_local_map = get_local_map (PT, current_buffer); |
| 7000 | goto replay_sequence; | 7009 | goto replay_sequence; |
| @@ -7092,6 +7101,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 7092 | emacsclient). */ | 7101 | emacsclient). */ |
| 7093 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 7102 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 7094 | 7103 | ||
| 7104 | if (! FRAME_LIVE_P (selected_frame)) | ||
| 7105 | Fkill_emacs (Qnil); | ||
| 7095 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 7106 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 7096 | orig_local_map = get_local_map (PT, current_buffer); | 7107 | orig_local_map = get_local_map (PT, current_buffer); |
| 7097 | goto replay_sequence; | 7108 | goto replay_sequence; |