Mercurial > hg > xemacs-beta
comparison man/lispref/control.texi @ 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 | 37e56e920ac5 |
children | 755ae5b97edb |
comparison
equal
deleted
inserted
replaced
2296:a58ea4d0d0cd | 2297:13a418960a88 |
---|---|
618 We still have two return points, but this time only the outer one has | 618 We still have two return points, but this time only the outer one has |
619 the tag @code{hack}; the inner one has the tag @code{quux} instead. | 619 the tag @code{hack}; the inner one has the tag @code{quux} instead. |
620 Therefore, @code{throw} makes the outer @code{catch} return the value | 620 Therefore, @code{throw} makes the outer @code{catch} return the value |
621 @code{yes}. The function @code{print} is never called, and the | 621 @code{yes}. The function @code{print} is never called, and the |
622 body-form @code{'no} is never evaluated. | 622 body-form @code{'no} is never evaluated. |
623 | |
624 In most cases the formal tag for a catch is a quoted symbol or a | |
625 variable whose value is a symbol. Both styles are demonstrated above. | |
626 In definitions of derived control structures, an anonymous tag may be | |
627 desired. A gensym could be used, but since catch tags are compared | |
628 using @code{eq}, any Lisp object can be used. An occasionally | |
629 encountered idiom is to bind a local variable to @code{(cons nil nil)}, | |
630 and use the variable as the formal tag. | |
623 | 631 |
624 @node Errors | 632 @node Errors |
625 @subsection Errors | 633 @subsection Errors |
626 @cindex errors | 634 @cindex errors |
627 | 635 |