aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2003-02-23 22:11:20 +0000
committerJan Djärv2003-02-23 22:11:20 +0000
commit0af912f093d946e3e518909cae43d5ed6f4fcab8 (patch)
tree65df5c06df3d6cdb721320e892ae0e8568fd5a3c /src
parent60a653f1cdd20b50706efa89f374c39008aab3fc (diff)
downloademacs-0af912f093d946e3e518909cae43d5ed6f4fcab8.tar.gz
emacs-0af912f093d946e3e518909cae43d5ed6f4fcab8.zip
* keyboard.c (cancel_hourglass_unwind): New function.
(command_loop_1): Cancel hourglass with unwind-protect.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keyboard.c32
2 files changed, 29 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 88d4dd3222a..3e056ced267 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12003-02-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * keyboard.c (cancel_hourglass_unwind): New function.
4 (command_loop_1): Cancel hourglass with unwind-protect.
5
12003-02-23 Richard M. Stallman <rms@gnu.org> 62003-02-23 Richard M. Stallman <rms@gnu.org>
2 7
3 * callint.c (fix_command): New subroutine, from Fcall_interactively. 8 * callint.c (fix_command): New subroutine, from Fcall_interactively.
diff --git a/src/keyboard.c b/src/keyboard.c
index ec723e3c658..17cc6787f7f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1353,6 +1353,15 @@ static int read_key_sequence P_ ((Lisp_Object *, int, Lisp_Object,
1353void safe_run_hooks P_ ((Lisp_Object)); 1353void safe_run_hooks P_ ((Lisp_Object));
1354static void adjust_point_for_property P_ ((int, int)); 1354static void adjust_point_for_property P_ ((int, int));
1355 1355
1356/* Cancel hourglass from protect_unwind.
1357 ARG is not used. */
1358static Lisp_Object
1359cancel_hourglass_unwind (arg)
1360 Lisp_Object arg;
1361{
1362 cancel_hourglass ();
1363}
1364
1356Lisp_Object 1365Lisp_Object
1357command_loop_1 () 1366command_loop_1 ()
1358{ 1367{
@@ -1724,16 +1733,22 @@ command_loop_1 ()
1724 1733
1725 /* Here for a command that isn't executed directly */ 1734 /* Here for a command that isn't executed directly */
1726 1735
1736 {
1727#ifdef HAVE_X_WINDOWS 1737#ifdef HAVE_X_WINDOWS
1728 if (display_hourglass_p 1738 int scount = SPECPDL_INDEX ();
1729 && NILP (Vexecuting_macro)) 1739
1730 start_hourglass (); 1740 if (display_hourglass_p
1741 && NILP (Vexecuting_macro))
1742 {
1743 record_unwind_protect (cancel_hourglass_unwind, Qnil);
1744 start_hourglass ();
1745 }
1731#endif 1746#endif
1732 1747
1733 nonundocount = 0; 1748 nonundocount = 0;
1734 if (NILP (current_kboard->Vprefix_arg)) 1749 if (NILP (current_kboard->Vprefix_arg))
1735 Fundo_boundary (); 1750 Fundo_boundary ();
1736 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); 1751 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
1737 1752
1738#ifdef HAVE_X_WINDOWS 1753#ifdef HAVE_X_WINDOWS
1739 /* Do not check display_hourglass_p here, because 1754 /* Do not check display_hourglass_p here, because
@@ -1742,8 +1757,9 @@ command_loop_1 ()
1742 But don't cancel the hourglass within a macro 1757 But don't cancel the hourglass within a macro
1743 just because a command in the macro finishes. */ 1758 just because a command in the macro finishes. */
1744 if (NILP (Vexecuting_macro)) 1759 if (NILP (Vexecuting_macro))
1745 cancel_hourglass (); 1760 unbind_to (scount, Qnil);
1746#endif 1761#endif
1762 }
1747 } 1763 }
1748 directly_done: ; 1764 directly_done: ;
1749 current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; 1765 current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg;