aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-05 17:24:19 +0000
committerGerd Moellmann2000-07-05 17:24:19 +0000
commita2ff3819f64ba2d79b3fc92756a13332afd6a37e (patch)
tree18e31aa0e95784747c9fe4c7335711c71658351b
parentfab88cb7022ae6ced44f4f132b77592f801c384c (diff)
downloademacs-a2ff3819f64ba2d79b3fc92756a13332afd6a37e.tar.gz
emacs-a2ff3819f64ba2d79b3fc92756a13332afd6a37e.zip
(Vsignaling_function): New variable.
(Fsignal): Compute it. (syms_of_eval): Staticpro it.
-rw-r--r--src/eval.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 487b2d8e5b8..d59ceb38eac 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -163,6 +163,11 @@ int when_entered_debugger;
163 163
164Lisp_Object Vdebugger; 164Lisp_Object Vdebugger;
165 165
166/* The function from which the last `signal' was called. Set in
167 Fsignal. */
168
169Lisp_Object Vsignaling_function;
170
166void specbind (), record_unwind_protect (); 171void specbind (), record_unwind_protect ();
167 172
168Lisp_Object run_hook_with_args (); 173Lisp_Object run_hook_with_args ();
@@ -1274,6 +1279,7 @@ See also the function `condition-case'.")
1274 Lisp_Object string; 1279 Lisp_Object string;
1275 Lisp_Object real_error_symbol; 1280 Lisp_Object real_error_symbol;
1276 extern int display_busy_cursor_p; 1281 extern int display_busy_cursor_p;
1282 struct backtrace *bp;
1277 1283
1278 immediate_quit = 0; 1284 immediate_quit = 0;
1279 if (gc_in_progress || waiting_for_input) 1285 if (gc_in_progress || waiting_for_input)
@@ -1297,6 +1303,14 @@ See also the function `condition-case'.")
1297 1303
1298 conditions = Fget (real_error_symbol, Qerror_conditions); 1304 conditions = Fget (real_error_symbol, Qerror_conditions);
1299 1305
1306 /* Remember from where signal was called. Skip over the frame for
1307 `signal' itself. If a frame for `error' follows, skip that,
1308 too. */
1309 bp = backtrace_list->next;
1310 if (bp && bp->function && EQ (*bp->function, Qerror))
1311 bp = bp->next;
1312 Vsignaling_function = bp && bp->function ? *bp->function : Qnil;
1313
1300 for (; handlerlist; handlerlist = handlerlist->next) 1314 for (; handlerlist; handlerlist = handlerlist->next)
1301 { 1315 {
1302 register Lisp_Object clause; 1316 register Lisp_Object clause;
@@ -3066,6 +3080,7 @@ If NFRAMES is more than the number of frames, the value is nil.")
3066 return Fcons (Qt, Fcons (*backlist->function, tem)); 3080 return Fcons (Qt, Fcons (*backlist->function, tem));
3067 } 3081 }
3068} 3082}
3083
3069 3084
3070void 3085void
3071syms_of_eval () 3086syms_of_eval ()
@@ -3197,6 +3212,8 @@ still determine whether to handle the particular condition.");
3197 3212
3198 staticpro (&Vautoload_queue); 3213 staticpro (&Vautoload_queue);
3199 Vautoload_queue = Qnil; 3214 Vautoload_queue = Qnil;
3215 staticpro (&Vsignaling_function);
3216 Vsignaling_function = Qnil;
3200 3217
3201 defsubr (&Sor); 3218 defsubr (&Sor);
3202 defsubr (&Sand); 3219 defsubr (&Sand);