diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 17 |
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 | ||
| 164 | Lisp_Object Vdebugger; | 164 | Lisp_Object Vdebugger; |
| 165 | 165 | ||
| 166 | /* The function from which the last `signal' was called. Set in | ||
| 167 | Fsignal. */ | ||
| 168 | |||
| 169 | Lisp_Object Vsignaling_function; | ||
| 170 | |||
| 166 | void specbind (), record_unwind_protect (); | 171 | void specbind (), record_unwind_protect (); |
| 167 | 172 | ||
| 168 | Lisp_Object run_hook_with_args (); | 173 | Lisp_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 | ||
| 3070 | void | 3085 | void |
| 3071 | syms_of_eval () | 3086 | syms_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); |