Flesh out an example and fix a typo.
authorTaylor R Campbell <campbell@mumble.net>
Sun, 30 Jun 2019 23:44:16 +0000 (23:44 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sun, 30 Jun 2019 23:44:16 +0000 (23:44 +0000)
doc/ref-manual/numbers.texi

index 4975258bb29f1f0b816ded882c564eed3ce52e7b..b5513af9ee42a7a80e73a6761e0967825a938c7e 100644 (file)
@@ -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!}.