diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2003-03-08 10:43:36 +0000 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2003-03-08 10:43:36 +0000 |
commit | e6f499544c882604554edba0895bbc006a1ee44f (patch) | |
tree | 3121238c5749817169708c8e455dd2d9c836572e | |
parent | 943a17ad1fc053e2bd25287a41d20c060fe4fe32 (diff) | |
download | emacs-e6f499544c882604554edba0895bbc006a1ee44f.tar.gz |
Fix hourglass problems
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/keyboard.c | 36 | ||||
-rw-r--r-- | src/lread.c | 4 |
3 files changed, 34 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c7c102df01a..574d0e37a7c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2003-03-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * keyboard.c (cancel_hourglass_unwind): New function. + (command_loop_1): Cancel hourglass with unwind-protect. + + * lread.c (read_filtered_event): Remove call to start_hourglass. + 2003-03-07 Kenichi Handa <handa@etlken2> * coding.c (CODING_ADD_COMPOSITION_COMPONENT): If the number of diff --git a/src/keyboard.c b/src/keyboard.c index c1b02eb4520..9d5e8ed4ac6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1309,6 +1309,17 @@ static int read_key_sequence P_ ((Lisp_Object *, int, Lisp_Object, void safe_run_hooks P_ ((Lisp_Object)); static void adjust_point_for_property P_ ((int)); +/* Cancel hourglass from protect_unwind. + ARG is not used. */ +#ifdef HAVE_X_WINDOWS +static Lisp_Object +cancel_hourglass_unwind (arg) + Lisp_Object arg; +{ + cancel_hourglass (); +} +#endif + Lisp_Object command_loop_1 () { @@ -1632,21 +1643,28 @@ command_loop_1 () } /* Here for a command that isn't executed directly */ - + + { #ifdef HAVE_X_WINDOWS - if (display_hourglass_p) - start_hourglass (); + int scount = specpdl_ptr - specpdl; + + if (display_hourglass_p) + { + record_unwind_protect (cancel_hourglass_unwind, Qnil); + start_hourglass (); + } #endif - nonundocount = 0; - if (NILP (current_kboard->Vprefix_arg)) - Fundo_boundary (); - Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); + nonundocount = 0; + if (NILP (current_kboard->Vprefix_arg)) + Fundo_boundary (); + Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); #ifdef HAVE_X_WINDOWS - if (display_hourglass_p) - cancel_hourglass (); + if (display_hourglass_p) + unbind_to (scount, Qnil); #endif + } } directly_done: ; current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; diff --git a/src/lread.c b/src/lread.c index 834fb5d5109..fc571027341 100644 --- a/src/lread.c +++ b/src/lread.c @@ -489,10 +489,6 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii, if (! NILP (delayed_switch_frame)) unread_switch_frame = delayed_switch_frame; -#ifdef HAVE_WINDOW_SYSTEM - if (display_hourglass_p) - start_hourglass (); -#endif return val; } |