bug#67063: unread-string does not match documented functionality

Ludovic Courtès <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Hi Juliana,

Juliana Sims <[email protected]> skribis:

> This patch simply fixes bug 67063.
>
> Thanks,
> Juli
>
> * doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
> procedure documentation in line with other procedures in the section.
> * libguile/ports.c (scm_unread_string): Make port argument optional.
> * test-suite/tests/ports.test: Test unread-char and unread-string
> without ports.

Finally applied with these changes:


Not sure why the C functions aren’t documented for the other ones.

Thanks,
Ludo’.
(unnamed) (text/x-patch, 1.1 KB)
diff --git a/NEWS b/NEWS
index 8a61bf65d..3c4854ca9 100644
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,8 @@ files.  See "Random Access" in the manual for details.
    (<https://bugs.gnu.org/55356>)
 ** 'read-u8' in (scheme base) now defaults to (current-input-port)
    (<https://bugs.gnu.org/62690>)
+** Second argument of 'unread-string' is now optional, as previously documented
+   (<https://bugs.gnu.org/67063>)
 ** 'ftw' now correctly deals with directory permissions
    (<https://bugs.gnu.org/55344>)
 ** 'make-custom-port' now honors its #:conversion-strategy argument
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 3a0f7a9a1..79bc9e9d6 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -2001,6 +2001,7 @@ current input port, and the arguments are swapped.  @xref{Textual I/O}.
 @end deffn
 
 @deffn {Scheme Procedure} unread-string str [port]
+@deffnx {C Function} scm_unread_string (str, port)
 The same as @code{unget-string}, except that @var{port} defaults to the
 current input port, and the arguments are swapped.  @xref{Textual I/O}.
 @end deffn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.