comparison src/keyboard.c @ 60556:5aa4c4b8de08

* keyboard.c (Fexecute_extended_command): Restart hourglass after call to Fcompleting_read if already started.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 10 Mar 2005 19:08:31 +0000
parents 1b47709417bd
children daacc07136fb 48ba3f89c89f e330fedc9152
comparison
equal deleted inserted replaced
60555:2895b0a63b0e 60556:5aa4c4b8de08
1347 { 1347 {
1348 #ifdef HAVE_X_WINDOWS 1348 #ifdef HAVE_X_WINDOWS
1349 if (display_hourglass_p) 1349 if (display_hourglass_p)
1350 cancel_hourglass (); 1350 cancel_hourglass ();
1351 #endif 1351 #endif
1352
1353 /* Unblock input if we enter with input blocked. This may happen if
1354 redisplay traps e.g. during tool-bar update with input blocked. */
1355 while (INPUT_BLOCKED_P)
1356 UNBLOCK_INPUT;
1352 1357
1353 return Fthrow (Qtop_level, Qnil); 1358 return Fthrow (Qtop_level, Qnil);
1354 } 1359 }
1355 1360
1356 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", 1361 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
9709 char buf[40]; 9714 char buf[40];
9710 int saved_last_point_position; 9715 int saved_last_point_position;
9711 Lisp_Object saved_keys, saved_last_point_position_buffer; 9716 Lisp_Object saved_keys, saved_last_point_position_buffer;
9712 Lisp_Object bindings, value; 9717 Lisp_Object bindings, value;
9713 struct gcpro gcpro1, gcpro2, gcpro3; 9718 struct gcpro gcpro1, gcpro2, gcpro3;
9719 #ifdef HAVE_X_WINDOWS
9720 /* The call to Fcompleting_read wil start and cancel the hourglass,
9721 but if the hourglass was already scheduled, this means that no
9722 hourglass will be shown for the actual M-x command itself.
9723 So we restart it if it is already scheduled. Note that checking
9724 hourglass_shown_p is not enough, normally the hourglass is not shown,
9725 just scheduled to be shown. */
9726 int hstarted = hourglass_started ();
9727 #endif
9714 9728
9715 saved_keys = Fvector (this_command_key_count, 9729 saved_keys = Fvector (this_command_key_count,
9716 XVECTOR (this_command_keys)->contents); 9730 XVECTOR (this_command_keys)->contents);
9717 saved_last_point_position_buffer = last_point_position_buffer; 9731 saved_last_point_position_buffer = last_point_position_buffer;
9718 saved_last_point_position = last_point_position; 9732 saved_last_point_position = last_point_position;
9739 history list. */ 9753 history list. */
9740 function = Fcompleting_read (build_string (buf), 9754 function = Fcompleting_read (build_string (buf),
9741 Vobarray, Qcommandp, 9755 Vobarray, Qcommandp,
9742 Qt, Qnil, Qextended_command_history, Qnil, 9756 Qt, Qnil, Qextended_command_history, Qnil,
9743 Qnil); 9757 Qnil);
9758
9759 #ifdef HAVE_X_WINDOWS
9760 if (hstarted) start_hourglass ();
9761 #endif
9744 9762
9745 if (STRINGP (function) && SCHARS (function) == 0) 9763 if (STRINGP (function) && SCHARS (function) == 0)
9746 error ("No command name given"); 9764 error ("No command name given");
9747 9765
9748 /* Set this_command_keys to the concatenation of saved_keys and 9766 /* Set this_command_keys to the concatenation of saved_keys and