From: Richard M. Stallman Date: Sat, 11 Mar 2006 15:19:31 +0000 (+0000) Subject: (unwind_to_catch): Call x_fully_uncatch_errors. X-Git-Tag: emacs-pretest-22.0.90~3691 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88019a632801faf4b322b997971658a83274f33d;p=emacs.git (unwind_to_catch): Call x_fully_uncatch_errors. (internal_condition_case_1, internal_condition_case_2): Abort if within unclosed x_catch_errors. --- diff --git a/src/eval.c b/src/eval.c index a84948981f4..435667e4d50 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1259,6 +1259,10 @@ unwind_to_catch (catch, value) } while (! last_time); + /* If x_catch_errors was done, turn it off now. + (First we give unbind_to a chance to do that.) */ + x_fully_uncatch_errors (); + byte_stack_list = catch->byte_stack; gcprolist = catch->gcpro; #ifdef DEBUG_GCPRO @@ -1435,10 +1439,10 @@ internal_condition_case (bfun, handlers, hfun) struct catchtag c; struct handler h; -#if 0 /* We now handle interrupt_input_blocked properly. - What we still do not handle is exiting a signal handler. */ + /* Since Fsignal will close off all calls to x_catch_errors, + we will get the wrong results if some are not closed now. */ + if (x_catching_errors ()) abort (); -#endif c.tag = Qnil; c.val = Qnil; @@ -1481,6 +1485,11 @@ internal_condition_case_1 (bfun, arg, handlers, hfun) struct catchtag c; struct handler h; + /* Since Fsignal will close off all calls to x_catch_errors, + we will get the wrong results if some are not closed now. */ + if (x_catching_errors ()) + abort (); + c.tag = Qnil; c.val = Qnil; c.backlist = backtrace_list; @@ -1525,6 +1534,11 @@ internal_condition_case_2 (bfun, nargs, args, handlers, hfun) struct catchtag c; struct handler h; + /* Since Fsignal will close off all calls to x_catch_errors, + we will get the wrong results if some are not closed now. */ + if (x_catching_errors ()) + abort (); + c.tag = Qnil; c.val = Qnil; c.backlist = backtrace_list;