Mercurial > hg > xemacs-beta
comparison src/eval.c @ 2297:13a418960a88
[xemacs-hg @ 2004-09-22 02:05:42 by stephent]
various doc patches <87isa7awrh.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 22 Sep 2004 02:06:52 +0000 |
parents | 04bc9d2f42c7 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2296:a58ea4d0d0cd | 2297:13a418960a88 |
---|---|
1470 #endif /* ERROR_CHECK_TRAPPING_PROBLEMS */ | 1470 #endif /* ERROR_CHECK_TRAPPING_PROBLEMS */ |
1471 | 1471 |
1472 DEFUN ("catch", Fcatch, 1, UNEVALLED, 0, /* | 1472 DEFUN ("catch", Fcatch, 1, UNEVALLED, 0, /* |
1473 \(catch TAG BODY...): eval BODY allowing nonlocal exits using `throw'. | 1473 \(catch TAG BODY...): eval BODY allowing nonlocal exits using `throw'. |
1474 TAG is evalled to get the tag to use. Then the BODY is executed. | 1474 TAG is evalled to get the tag to use. Then the BODY is executed. |
1475 Within BODY, (throw TAG) with same tag exits BODY and exits this `catch'. | 1475 Within BODY, (throw TAG) with same (`eq') tag exits BODY and this `catch'. |
1476 If no throw happens, `catch' returns the value of the last BODY form. | 1476 If no throw happens, `catch' returns the value of the last BODY form. |
1477 If a throw happens, it specifies the value to return from `catch'. | 1477 If a throw happens, it specifies the value to return from `catch'. |
1478 */ | 1478 */ |
1479 (args)) | 1479 (args)) |
1480 { | 1480 { |
1534 | 1534 |
1535 | 1535 |
1536 /* Unwind the specbind, catch, and handler stacks back to CATCH, and | 1536 /* Unwind the specbind, catch, and handler stacks back to CATCH, and |
1537 jump to that CATCH, returning VALUE as the value of that catch. | 1537 jump to that CATCH, returning VALUE as the value of that catch. |
1538 | 1538 |
1539 This is the guts Fthrow and Fsignal; they differ only in the way | 1539 This is the guts of Fthrow and Fsignal; they differ only in the |
1540 they choose the catch tag to throw to. A catch tag for a | 1540 way they choose the catch tag to throw to. A catch tag for a |
1541 condition-case form has a TAG of Qnil. | 1541 condition-case form has a TAG of Qnil. |
1542 | 1542 |
1543 Before each catch is discarded, unbind all special bindings and | 1543 Before each catch is discarded, unbind all special bindings and |
1544 execute all unwind-protect clauses made above that catch. Unwind | 1544 execute all unwind-protect clauses made above that catch. Unwind |
1545 the handler stack as we go, so that the proper handlers are in | 1545 the handler stack as we go, so that the proper handlers are in |
1707 condition_case_1). See below for more info. | 1707 condition_case_1). See below for more info. |
1708 */ | 1708 */ |
1709 | 1709 |
1710 DEFUN_NORETURN ("throw", Fthrow, 2, 2, 0, /* | 1710 DEFUN_NORETURN ("throw", Fthrow, 2, 2, 0, /* |
1711 Throw to the catch for TAG and return VALUE from it. | 1711 Throw to the catch for TAG and return VALUE from it. |
1712 Both TAG and VALUE are evalled. | 1712 Both TAG and VALUE are evalled. Tags are the same iff they are `eq'. |
1713 */ | 1713 */ |
1714 (tag, value)) | 1714 (tag, value)) |
1715 { | 1715 { |
1716 throw_or_bomb_out (tag, value, 0, Qnil, Qnil); /* Doesn't return */ | 1716 throw_or_bomb_out (tag, value, 0, Qnil, Qnil); /* Doesn't return */ |
1717 RETURN_NOT_REACHED (Qnil); | 1717 RETURN_NOT_REACHED (Qnil); |