From: Gerd Moellmann Date: Fri, 25 Feb 2000 13:30:50 +0000 (+0000) Subject: (command_loop_1): Call start_busy_cursor before X-Git-Tag: emacs-pretest-21.0.90~4887 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0c484784c87d565c39a6ad6236ec9bc2ed71cc0;p=emacs.git (command_loop_1): Call start_busy_cursor before Fcommand_execute and cancel_busy_cursor after it. (timer_check): Remove busy-cursor code. (Fread_key_sequence, Fread_key_sequence_vector): Start/cancel busy cursor timer. --- diff --git a/src/keyboard.c b/src/keyboard.c index 19f4ef0ea9a..ff94b42677c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1519,18 +1519,18 @@ command_loop_1 () #ifdef HAVE_X_WINDOWS if (display_busy_cursor_p) - { - if (inhibit_busy_cursor != 2) - inhibit_busy_cursor = 0; - if (!inhibit_busy_cursor) - Fx_show_busy_cursor (); - } + start_busy_cursor (); #endif nonundocount = 0; if (NILP (current_kboard->Vprefix_arg)) Fundo_boundary (); Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); + +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif } directly_done: ; current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; @@ -3627,9 +3627,6 @@ timer_check (do_it_now) { int was_locked = single_kboard; int count = specpdl_ptr - specpdl; -#ifdef HAVE_WINDOW_SYSTEM - int old_inhibit_busy_cursor = inhibit_busy_cursor; -#endif /* Mark the timer as triggered to prevent problems if the lisp code fails to reschedule it right. */ @@ -3637,17 +3634,9 @@ timer_check (do_it_now) specbind (Qinhibit_quit, Qt); -#ifdef HAVE_WINDOW_SYSTEM - inhibit_busy_cursor = 2; -#endif - call1 (Qtimer_event_handler, chosen_timer); timers_run++; -#ifdef HAVE_WINDOW_SYSTEM - inhibit_busy_cursor = old_inhibit_busy_cursor; -#endif - unbind_to (count, Qnil); /* Resume allowing input from any kboard, if that was true before. */ @@ -8493,10 +8482,20 @@ DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, this_single_command_key_start = 0; } +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif + i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + start_busy_cursor (); +#endif + if (i == -1) { Vquit_flag = Qt; @@ -8538,10 +8537,20 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, this_single_command_key_start = 0; } +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif + i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + start_busy_cursor (); +#endif + if (i == -1) { Vquit_flag = Qt;