summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-06-24 09:05:05 +0200
committerAndy Wingo <wingo@pobox.com>2016-06-24 09:05:05 +0200
commit20718dd94b8360e67c4df9caa5af3e079167e2a6 (patch)
treedd0c69969c476c48cc25f2716c8dda04635fe9c2
parentf84006c5644997ce9854df9070ec2f1fb8acd420 (diff)
Add with-input-from-port, etc documentation
* doc/ref/api-io.texi (Default Ports): Add documentation for with-input-from-port, with-output-to-port, and with-error-to-port. Fixes #20919.
-rw-r--r--doc/ref/api-io.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 48ff1779c..23620538a 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -886,6 +886,14 @@ Change the ports returned by @code{current-input-port},
so that they use the supplied @var{port} for input or output.
@end deffn
+@deffn {Scheme Procedure} with-input-from-port port thunk
+@deffnx {Scheme Procedure} with-output-to-port port thunk
+@deffnx {Scheme Procedure} with-error-to-port port thunk
+Call @var{thunk} in a dynamic environment in which
+@code{current-input-port}, @code{current-output-port} or
+@code{current-error-port} is rebound to the given @var{port}.
+@end deffn
+
@deftypefn {C Function} void scm_dynwind_current_input_port (SCM port)
@deftypefnx {C Function} void scm_dynwind_current_output_port (SCM port)
@deftypefnx {C Function} void scm_dynwind_current_error_port (SCM port)