From 20718dd94b8360e67c4df9caa5af3e079167e2a6 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 24 Jun 2016 09:05:05 +0200 Subject: 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. --- doc/ref/api-io.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/ref/api-io.texi') 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) -- cgit v1.2.3