From: Taylor R Campbell Date: Sun, 30 Jun 2019 23:44:16 +0000 (+0000) Subject: Flesh out an example and fix a typo. X-Git-Tag: mit-scheme-pucked-10.1.12~7^2~24 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0f38ed6b08715845aabdf9bcf138849bc7e1b87f;p=mit-scheme.git Flesh out an example and fix a typo. --- diff --git a/doc/ref-manual/numbers.texi b/doc/ref-manual/numbers.texi index 4975258bb..b5513af9e 100644 --- a/doc/ref-manual/numbers.texi +++ b/doc/ref-manual/numbers.texi @@ -2519,14 +2519,25 @@ currently trapped. exceptions altogether by @var{excepts}. @example +@group (define (flo:trap-exceptions! excepts) (flo:set-trapped-exceptions! - (fix:or excepts (fix:trapped-exceptions)))) + (fix:or (flo:trapped-exceptions) excepts))) + +(define (flo:untrap-exceptions! excepts) + (flo:set-trapped-exceptions! + (fix:andc (flo:trapped-exceptions) excepts))) + +(define (flo:set-trapped-exceptions! excepts) + (flo:trap-exceptions! excepts) + (flo:untrap-exceptions! + (fix:andc (flo:supported-exceptions) excepts))) +@end group @end example @end deffn @deffn procedure flo:with-exceptions-trapped excepts thunk -@deffnx procedure flo:with-exceptions-trapped excepts thunk +@deffnx procedure flo:with-exceptions-untrapped excepts thunk @deffnx procedure flo:with-trapped-exceptions excepts thunk Dynamic-extent analogues of @code{flo:trap-exceptions!}, @code{flo:untrap-exceptions!}, and @code{flo:set-trapped-exceptions!}.