diff options
| author | Andrea Corallo | 2020-12-19 21:02:49 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-12-19 21:28:00 +0100 |
| commit | ab985f41db5fdaeada513d28a065332fd8838cf4 (patch) | |
| tree | 31b852d5223ef6d0dbd4f4514f207c20b7d6417b /src/eval.c | |
| parent | 407fb165832341d3dccb78d2782d1790a19c4b9d (diff) | |
| download | emacs-ab985f41db5fdaeada513d28a065332fd8838cf4.tar.gz emacs-ab985f41db5fdaeada513d28a065332fd8838cf4.zip | |
Add 'internal_condition_case_5' (bug#45303).
* src/lisp.h (internal_condition_case_4)
(internal_condition_case_5): Declare.
* src/eval.c (internal_condition_case_5): New function.
* src/comp.c (eln_load_path_final_clean_up): Use
'internal_condition_case_5'.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 2b31b91175b..368fa0944a1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1534,6 +1534,35 @@ internal_condition_case_4 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object, | |||
| 1534 | } | 1534 | } |
| 1535 | } | 1535 | } |
| 1536 | 1536 | ||
| 1537 | /* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3, | ||
| 1538 | ARG4, ARG5 as its arguments. */ | ||
| 1539 | |||
| 1540 | Lisp_Object | ||
| 1541 | internal_condition_case_5 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object, | ||
| 1542 | Lisp_Object, Lisp_Object, | ||
| 1543 | Lisp_Object), | ||
| 1544 | Lisp_Object arg1, Lisp_Object arg2, | ||
| 1545 | Lisp_Object arg3, Lisp_Object arg4, | ||
| 1546 | Lisp_Object arg5, Lisp_Object handlers, | ||
| 1547 | Lisp_Object (*hfun) (Lisp_Object)) | ||
| 1548 | { | ||
| 1549 | struct handler *c = push_handler (handlers, CONDITION_CASE); | ||
| 1550 | if (sys_setjmp (c->jmp)) | ||
| 1551 | { | ||
| 1552 | Lisp_Object val = handlerlist->val; | ||
| 1553 | clobbered_eassert (handlerlist == c); | ||
| 1554 | handlerlist = handlerlist->next; | ||
| 1555 | return hfun (val); | ||
| 1556 | } | ||
| 1557 | else | ||
| 1558 | { | ||
| 1559 | Lisp_Object val = bfun (arg1, arg2, arg3, arg4, arg5); | ||
| 1560 | eassert (handlerlist == c); | ||
| 1561 | handlerlist = c->next; | ||
| 1562 | return val; | ||
| 1563 | } | ||
| 1564 | } | ||
| 1565 | |||
| 1537 | /* Like internal_condition_case but call BFUN with NARGS as first, | 1566 | /* Like internal_condition_case but call BFUN with NARGS as first, |
| 1538 | and ARGS as second argument. */ | 1567 | and ARGS as second argument. */ |
| 1539 | 1568 | ||