Mercurial > hg > xemacs-beta
diff src/redisplay.c @ 1320:4f58e6e65139
[xemacs-hg @ 2003-02-22 02:08:32 by ben]
oops
redisplay.c: Don't get in an infinite loop running post-redisplay actions.
author | ben |
---|---|
date | Sat, 22 Feb 2003 02:08:33 +0000 |
parents | b531bf8658e9 |
children | a19b0eb5dfc1 |
line wrap: on
line diff
--- 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