diff options
| author | Gerd Moellmann | 1999-09-13 11:13:36 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-09-13 11:13:36 +0000 |
| commit | 788f89eb860f2b0361b5d97bafeeb26b1369d0c9 (patch) | |
| tree | 3dc63e6924ee2a55fcd0df1725e5544e8e08e238 /src | |
| parent | 650afd94631dab4c2b157b8e638b06053c89702c (diff) | |
| download | emacs-788f89eb860f2b0361b5d97bafeeb26b1369d0c9.tar.gz emacs-788f89eb860f2b0361b5d97bafeeb26b1369d0c9.zip | |
(command_loop_1): Change for Lisp_Object
selected_frame.
(cmd_error_internal, command_loop_1, read_char,
kbd_buffer_get_event, read_avail_input,
read_char_minibuf_menu_prompt, read_key_sequence, Fsuspend_emacs,
interrupt_signal, quit_throw_to_read_char): Ditto.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index c9ae346c47e..cadf03ff070 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1037,6 +1037,7 @@ cmd_error_internal (data, context) | |||
| 1037 | { | 1037 | { |
| 1038 | Lisp_Object stream; | 1038 | Lisp_Object stream; |
| 1039 | int kill_emacs_p = 0; | 1039 | int kill_emacs_p = 0; |
| 1040 | struct frame *sf = SELECTED_FRAME (); | ||
| 1040 | 1041 | ||
| 1041 | Vquit_flag = Qnil; | 1042 | Vquit_flag = Qnil; |
| 1042 | Vinhibit_quit = Qt; | 1043 | Vinhibit_quit = Qt; |
| @@ -1045,12 +1046,12 @@ cmd_error_internal (data, context) | |||
| 1045 | /* If the window system or terminal frame hasn't been initialized | 1046 | /* If the window system or terminal frame hasn't been initialized |
| 1046 | yet, or we're not interactive, it's best to dump this message out | 1047 | yet, or we're not interactive, it's best to dump this message out |
| 1047 | to stderr and exit. */ | 1048 | to stderr and exit. */ |
| 1048 | if (!selected_frame->glyphs_initialized_p | 1049 | if (!sf->glyphs_initialized_p |
| 1049 | /* This is the case of the frame dumped with Emacs, when we're | 1050 | /* This is the case of the frame dumped with Emacs, when we're |
| 1050 | running under a window system. */ | 1051 | running under a window system. */ |
| 1051 | || (!NILP (Vwindow_system) | 1052 | || (!NILP (Vwindow_system) |
| 1052 | && !inhibit_window_system | 1053 | && !inhibit_window_system |
| 1053 | && FRAME_TERMCAP_P (selected_frame)) | 1054 | && FRAME_TERMCAP_P (sf)) |
| 1054 | || noninteractive) | 1055 | || noninteractive) |
| 1055 | { | 1056 | { |
| 1056 | stream = Qexternal_debugging_output; | 1057 | stream = Qexternal_debugging_output; |
| @@ -1237,7 +1238,7 @@ command_loop_1 () | |||
| 1237 | 1238 | ||
| 1238 | while (1) | 1239 | while (1) |
| 1239 | { | 1240 | { |
| 1240 | if (! FRAME_LIVE_P (selected_frame)) | 1241 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 1241 | Fkill_emacs (Qnil); | 1242 | Fkill_emacs (Qnil); |
| 1242 | 1243 | ||
| 1243 | /* Make sure the current window's buffer is selected. */ | 1244 | /* Make sure the current window's buffer is selected. */ |
| @@ -1292,7 +1293,7 @@ command_loop_1 () | |||
| 1292 | code swallows a switch-frame event, we'll fix things up here. | 1293 | code swallows a switch-frame event, we'll fix things up here. |
| 1293 | Is this a good idea? */ | 1294 | Is this a good idea? */ |
| 1294 | if (FRAMEP (internal_last_event_frame) | 1295 | if (FRAMEP (internal_last_event_frame) |
| 1295 | && XFRAME (internal_last_event_frame) != selected_frame) | 1296 | && !EQ (internal_last_event_frame, selected_frame)) |
| 1296 | Fselect_frame (internal_last_event_frame, Qnil); | 1297 | Fselect_frame (internal_last_event_frame, Qnil); |
| 1297 | #endif | 1298 | #endif |
| 1298 | /* If it has changed current-menubar from previous value, | 1299 | /* If it has changed current-menubar from previous value, |
| @@ -1312,7 +1313,7 @@ command_loop_1 () | |||
| 1312 | Qnil, 0, 1, 1); | 1313 | Qnil, 0, 1, 1); |
| 1313 | 1314 | ||
| 1314 | /* A filter may have run while we were reading the input. */ | 1315 | /* A filter may have run while we were reading the input. */ |
| 1315 | if (! FRAME_LIVE_P (selected_frame)) | 1316 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 1316 | Fkill_emacs (Qnil); | 1317 | Fkill_emacs (Qnil); |
| 1317 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 1318 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 1318 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); | 1319 | set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer)); |
| @@ -2018,7 +2019,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2018 | if (_setjmp (local_getcjmp)) | 2019 | if (_setjmp (local_getcjmp)) |
| 2019 | { | 2020 | { |
| 2020 | XSETINT (c, quit_char); | 2021 | XSETINT (c, quit_char); |
| 2021 | XSETFRAME (internal_last_event_frame, selected_frame); | 2022 | internal_last_event_frame = selected_frame; |
| 2022 | Vlast_event_frame = internal_last_event_frame; | 2023 | Vlast_event_frame = internal_last_event_frame; |
| 2023 | /* If we report the quit char as an event, | 2024 | /* If we report the quit char as an event, |
| 2024 | don't do so more than once. */ | 2025 | don't do so more than once. */ |
| @@ -2027,7 +2028,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2027 | 2028 | ||
| 2028 | #ifdef MULTI_KBOARD | 2029 | #ifdef MULTI_KBOARD |
| 2029 | { | 2030 | { |
| 2030 | KBOARD *kb = FRAME_KBOARD (selected_frame); | 2031 | KBOARD *kb = FRAME_KBOARD (XFRAME (selected_frame)); |
| 2031 | if (kb != current_kboard) | 2032 | if (kb != current_kboard) |
| 2032 | { | 2033 | { |
| 2033 | Lisp_Object *tailp = &kb->kbd_queue; | 2034 | Lisp_Object *tailp = &kb->kbd_queue; |
| @@ -3178,7 +3179,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3178 | frame = focus; | 3179 | frame = focus; |
| 3179 | 3180 | ||
| 3180 | if (! EQ (frame, internal_last_event_frame) | 3181 | if (! EQ (frame, internal_last_event_frame) |
| 3181 | && XFRAME (frame) != selected_frame) | 3182 | && !EQ (frame, selected_frame)) |
| 3182 | obj = make_lispy_switch_frame (frame); | 3183 | obj = make_lispy_switch_frame (frame); |
| 3183 | internal_last_event_frame = frame; | 3184 | internal_last_event_frame = frame; |
| 3184 | 3185 | ||
| @@ -3241,7 +3242,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 3241 | XSETFRAME (frame, f); | 3242 | XSETFRAME (frame, f); |
| 3242 | 3243 | ||
| 3243 | if (! EQ (frame, internal_last_event_frame) | 3244 | if (! EQ (frame, internal_last_event_frame) |
| 3244 | && XFRAME (frame) != selected_frame) | 3245 | && !EQ (frame, selected_frame)) |
| 3245 | obj = make_lispy_switch_frame (frame); | 3246 | obj = make_lispy_switch_frame (frame); |
| 3246 | internal_last_event_frame = frame; | 3247 | internal_last_event_frame = frame; |
| 3247 | } | 3248 | } |
| @@ -5626,7 +5627,7 @@ read_avail_input (expected) | |||
| 5626 | cbuf[i] &= ~0x80; | 5627 | cbuf[i] &= ~0x80; |
| 5627 | 5628 | ||
| 5628 | buf[i].code = cbuf[i]; | 5629 | buf[i].code = cbuf[i]; |
| 5629 | XSETFRAME (buf[i].frame_or_window, selected_frame); | 5630 | buf[i].frame_or_window = selected_frame; |
| 5630 | } | 5631 | } |
| 5631 | } | 5632 | } |
| 5632 | 5633 | ||
| @@ -6902,7 +6903,7 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps) | |||
| 6902 | int mapno; | 6903 | int mapno; |
| 6903 | register Lisp_Object name; | 6904 | register Lisp_Object name; |
| 6904 | int nlength; | 6905 | int nlength; |
| 6905 | int width = FRAME_WIDTH (selected_frame) - 4; | 6906 | int width = FRAME_WIDTH (SELECTED_FRAME ()) - 4; |
| 6906 | int idx = -1; | 6907 | int idx = -1; |
| 6907 | int nobindings = 1; | 6908 | int nobindings = 1; |
| 6908 | Lisp_Object rest, vector; | 6909 | Lisp_Object rest, vector; |
| @@ -7541,7 +7542,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 7541 | { | 7542 | { |
| 7542 | #ifdef MULTI_KBOARD | 7543 | #ifdef MULTI_KBOARD |
| 7543 | KBOARD *interrupted_kboard = current_kboard; | 7544 | KBOARD *interrupted_kboard = current_kboard; |
| 7544 | struct frame *interrupted_frame = selected_frame; | 7545 | struct frame *interrupted_frame = SELECTED_FRAME (); |
| 7545 | if (setjmp (wrong_kboard_jmpbuf)) | 7546 | if (setjmp (wrong_kboard_jmpbuf)) |
| 7546 | { | 7547 | { |
| 7547 | if (!NILP (delayed_switch_frame)) | 7548 | if (!NILP (delayed_switch_frame)) |
| @@ -7609,7 +7610,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 7609 | of the command_loop_1. */ | 7610 | of the command_loop_1. */ |
| 7610 | if (fix_current_buffer) | 7611 | if (fix_current_buffer) |
| 7611 | { | 7612 | { |
| 7612 | if (! FRAME_LIVE_P (selected_frame)) | 7613 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 7613 | Fkill_emacs (Qnil); | 7614 | Fkill_emacs (Qnil); |
| 7614 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 7615 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 7615 | Fset_buffer (XWINDOW (selected_window)->buffer); | 7616 | Fset_buffer (XWINDOW (selected_window)->buffer); |
| @@ -7712,7 +7713,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 7712 | emacsclient). */ | 7713 | emacsclient). */ |
| 7713 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 7714 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 7714 | 7715 | ||
| 7715 | if (! FRAME_LIVE_P (selected_frame)) | 7716 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) |
| 7716 | Fkill_emacs (Qnil); | 7717 | Fkill_emacs (Qnil); |
| 7717 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 7718 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 7718 | orig_local_map = get_local_map (PT, current_buffer); | 7719 | orig_local_map = get_local_map (PT, current_buffer); |
| @@ -9022,7 +9023,7 @@ On such systems, Emacs starts a subshell instead of suspending.") | |||
| 9022 | with a window system; but suspend should be disabled in that case. */ | 9023 | with a window system; but suspend should be disabled in that case. */ |
| 9023 | get_frame_size (&width, &height); | 9024 | get_frame_size (&width, &height); |
| 9024 | if (width != old_width || height != old_height) | 9025 | if (width != old_width || height != old_height) |
| 9025 | change_frame_size (selected_frame, height, width, 0, 0, 0); | 9026 | change_frame_size (SELECTED_FRAME (), height, width, 0, 0, 0); |
| 9026 | 9027 | ||
| 9027 | /* Run suspend-resume-hook. */ | 9028 | /* Run suspend-resume-hook. */ |
| 9028 | if (!NILP (Vrun_hooks)) | 9029 | if (!NILP (Vrun_hooks)) |
| @@ -9115,6 +9116,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 9115 | char c; | 9116 | char c; |
| 9116 | /* Must preserve main program's value of errno. */ | 9117 | /* Must preserve main program's value of errno. */ |
| 9117 | int old_errno = errno; | 9118 | int old_errno = errno; |
| 9119 | struct frame *sf = SELECTED_FRAME (); | ||
| 9118 | 9120 | ||
| 9119 | #if defined (USG) && !defined (POSIX_SIGNALS) | 9121 | #if defined (USG) && !defined (POSIX_SIGNALS) |
| 9120 | if (!read_socket_hook && NILP (Vwindow_system)) | 9122 | if (!read_socket_hook && NILP (Vwindow_system)) |
| @@ -9129,7 +9131,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 9129 | cancel_echoing (); | 9131 | cancel_echoing (); |
| 9130 | 9132 | ||
| 9131 | if (!NILP (Vquit_flag) | 9133 | if (!NILP (Vquit_flag) |
| 9132 | && (FRAME_TERMCAP_P (selected_frame) || FRAME_MSDOS_P (selected_frame))) | 9134 | && (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))) |
| 9133 | { | 9135 | { |
| 9134 | /* If SIGINT isn't blocked, don't let us be interrupted by | 9136 | /* If SIGINT isn't blocked, don't let us be interrupted by |
| 9135 | another SIGINT, it might be harmful due to non-reentrancy | 9137 | another SIGINT, it might be harmful due to non-reentrancy |
| @@ -9272,7 +9274,7 @@ quit_throw_to_read_char () | |||
| 9272 | #endif | 9274 | #endif |
| 9273 | #endif | 9275 | #endif |
| 9274 | if (FRAMEP (internal_last_event_frame) | 9276 | if (FRAMEP (internal_last_event_frame) |
| 9275 | && XFRAME (internal_last_event_frame) != selected_frame) | 9277 | && !EQ (internal_last_event_frame, selected_frame)) |
| 9276 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), | 9278 | do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), |
| 9277 | Qnil, 0); | 9279 | Qnil, 0); |
| 9278 | 9280 | ||