comparison src/signal.c @ 2034:51e4a77ed447

[xemacs-hg @ 2004-04-19 14:39:45 by james] Move QUIT checking down one level to catch QUITP and avoid catching uses of QUIT that have already disabled checking.
author james
date Mon, 19 Apr 2004 14:39:49 +0000
parents b531bf8658e9
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
2033:a7b2d995287f 2034:51e4a77ed447
434 draining the message queue). establish_slow_interrupt_timer() is 434 draining the message queue). establish_slow_interrupt_timer() is
435 too low-level to do anything that might invoke QUIT or call Lisp 435 too low-level to do anything that might invoke QUIT or call Lisp
436 code. */ 436 code. */
437 437
438 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS 438 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS
439 assert_with_message
440 (proper_redisplay_wrapping_in_place (),
441 "QUIT called from within redisplay without being properly wrapped");
442
443 /* When in a critical section, don't reset something_happened, so that 439 /* When in a critical section, don't reset something_happened, so that
444 every single QUIT will verify proper wrapping. (something_happened 440 every single QUIT will verify proper wrapping. (something_happened
445 was set by enter_redisplay_critical_section() and will be reset 441 was set by enter_redisplay_critical_section() and will be reset
446 upon exit.) */ 442 upon exit.) */
447 if (!in_display) 443 if (!in_display)
980 if (dont_check_for_quit) 976 if (dont_check_for_quit)
981 return; 977 return;
982 978
983 if (quit_check_signal_happened) 979 if (quit_check_signal_happened)
984 { 980 {
981 #ifdef ERROR_CHECK_TRAPPING_PROBLEMS
982 /* Since the code below can call Lisp, make sure that proper wrapping is
983 in place during redisplay. */
984 assert_with_message
985 (proper_redisplay_wrapping_in_place (),
986 "QUIT called from within redisplay without being properly wrapped");
987 #endif
988
985 /* Since arbitrary Lisp code may be executed (e.g. through a menu 989 /* Since arbitrary Lisp code may be executed (e.g. through a menu
986 filter, see backtrace directly above), GC might happen, 990 filter, see backtrace directly above), GC might happen,
987 which would majorly fuck a lot of things, e.g. re_match() 991 which would majorly fuck a lot of things, e.g. re_match()
988 [string gets relocated] and lots of other code that's not 992 [string gets relocated] and lots of other code that's not
989 prepared to handle GC in QUIT. */ 993 prepared to handle GC in QUIT. */