# HG changeset patch # User ben # Date 1045879713 0 # Node ID 4f58e6e6513998ed1436fb23bf9456b6f8c358f0 # Parent 48817884fdbb5d130bbeafa6cddba3160695188b [xemacs-hg @ 2003-02-22 02:08:32 by ben] oops redisplay.c: Don't get in an infinite loop running post-redisplay actions. diff -r 48817884fdbb -r 4f58e6e65139 src/ChangeLog --- a/src/ChangeLog Fri Feb 21 22:52:35 2003 +0000 +++ b/src/ChangeLog Sat Feb 22 02:08:33 2003 +0000 @@ -1,3 +1,9 @@ +2003-02-21 Ben Wing + + * redisplay.c: + * redisplay.c (run_post_redisplay_actions): + Don't get in an infinite loop running post-redisplay actions. + 2003-02-20 Ben Wing * alloc.c: diff -r 48817884fdbb -r 4f58e6e65139 src/redisplay.c --- a/src/redisplay.c Fri Feb 21 22:52:35 2003 +0000 +++ b/src/redisplay.c Sat Feb 22 02:08:33 2003 +0000 @@ -6715,9 +6715,20 @@ ((void *) fun), arg))); } +static int running_post_redisplay_actions; + static void run_post_redisplay_actions (void) { + int depth; + + if (running_post_redisplay_actions) + return; + + depth = internal_bind_int (&running_post_redisplay_actions, 1); + /* If the function pushes further actions, they will be tacked onto + the end of the list, and we'll run them when we're done with the + current ones. */ while (!NILP (Vpost_redisplay_actions)) { Lisp_Object car = XCAR (Vpost_redisplay_actions); @@ -6728,6 +6739,7 @@ free_cons (car); Vpost_redisplay_actions = XCDR (Vpost_redisplay_actions); } + unbind_to (depth); } #ifdef ERROR_CHECK_TRAPPING_PROBLEMS