1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Andy Wingo 2016-06-24 09:05:05 +02:00
parent f84006c564
commit 20718dd94b

View file

@ -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)