mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 19:20:23 +02:00
Improve the usage of variable names in Scheme docstrings.
* module/ice-9/boot-9.scm: * module/ice-9/popen.scm: * module/ice-9/pretty-print.scm: * module/ice-9/r4rs.scm: * module/rnrs/io/ports.scm: * module/texinfo/string-utils.scm: * module/web/http.scm: * module/web/request.scm: * module/web/response.scm: * test-suite/vm/run-vm-tests.scm: Make the variable names in Scheme docstrings more consistent. Replace a few instances of @var with @code when appropriate.
This commit is contained in:
parent
b7e64f8b26
commit
91a214ebd9
10 changed files with 16 additions and 16 deletions
|
@ -161,7 +161,7 @@ non-locally, that exit determines the continuation."
|
|||
(set! with-throw-handler
|
||||
(lambda (k thunk pre-unwind-handler)
|
||||
"Add @var{handler} to the dynamic context as a throw handler
|
||||
for key @var{key}, then invoke @var{thunk}."
|
||||
for key @var{k}, then invoke @var{thunk}."
|
||||
(if (not (or (symbol? k) (eqv? k #t)))
|
||||
(scm-error 'wrong-type-arg "with-throw-handler"
|
||||
"Wrong type argument in position ~a: ~a"
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
"Executes the program @var{command} with optional arguments
|
||||
@var{args} (all strings) in a subprocess.
|
||||
A port to the process (based on pipes) is created and returned.
|
||||
@var{modes} specifies whether an input, an output or an input-output
|
||||
@var{mode} specifies whether an input, an output or an input-output
|
||||
port to the process is created: it should be the value of
|
||||
@code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}."
|
||||
(let* ((port/pid (apply open-process mode command args))
|
||||
|
@ -148,7 +148,7 @@ port to the process is created: it should be the value of
|
|||
(define (open-pipe command mode)
|
||||
"Executes the shell command @var{command} (a string) in a subprocess.
|
||||
A port to the process (based on pipes) is created and returned.
|
||||
@var{modes} specifies whether an input, an output or an input-output
|
||||
@var{mode} specifies whether an input, an output or an input-output
|
||||
port to the process is created: it should be the value of
|
||||
@code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}."
|
||||
(open-pipe* mode "/bin/sh" "-c" command))
|
||||
|
|
|
@ -298,7 +298,7 @@ port directly after OBJ, like (pretty-print OBJ PORT)."
|
|||
(width 79)
|
||||
(display? #f)
|
||||
(breadth-first? #f))
|
||||
"Print @var{obj}, truncating the output, if necessary, to make it fit
|
||||
"Print @var{x}, truncating the output, if necessary, to make it fit
|
||||
into @var{width} characters. By default, @var{x} will be printed using
|
||||
@code{write}, though that behavior can be overriden via the
|
||||
@var{display?} keyword argument.
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
(@call-with-values producer consumer))
|
||||
(define (dynamic-wind in thunk out)
|
||||
"All three arguments must be 0-argument procedures.
|
||||
@var{in_guard} is called, then @var{thunk}, then
|
||||
@var{out_guard}.
|
||||
Guard @var{in} is called, then @var{thunk}, then
|
||||
guard @var{out}.
|
||||
|
||||
If, any time during the execution of @var{thunk}, the
|
||||
continuation of the @code{dynamic_wind} expression is escaped
|
||||
non-locally, @var{out_guard} is called. If the continuation of
|
||||
the dynamic-wind is re-entered, @var{in_guard} is called. Thus
|
||||
@var{in_guard} and @var{out_guard} may be called any number of
|
||||
non-locally, @var{out} is called. If the continuation of
|
||||
the dynamic-wind is re-entered, @var{in} is called. Thus
|
||||
@var{in} and @var{out} may be called any number of
|
||||
times.
|
||||
@lisp
|
||||
(define x 'normal-binding)
|
||||
|
|
|
@ -237,7 +237,7 @@ if the port has no transcoder."
|
|||
(not (port-encoding port)))
|
||||
|
||||
(define (textual-port? port)
|
||||
"Always returns @var{#t}, as all ports can be used for textual I/O in
|
||||
"Always returns @code{#t}, as all ports can be used for textual I/O in
|
||||
Guile."
|
||||
#t)
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ characters. Any needed padding is done by character @var{chr}, which
|
|||
defaults to @samp{#\\space}. If @var{rchr} is provided, then the
|
||||
padding to the right will use it instead. See the examples below.
|
||||
left and @var{rchr} on the right. The default @var{width} is 80. The
|
||||
default @var{lchr} and @var{rchr} is @samp{#\\space}. The string is
|
||||
default @var{chr} and @var{rchr} is @samp{#\\space}. The string is
|
||||
never truncated.
|
||||
@lisp
|
||||
(center-string \"Richard Todd\" 24)
|
||||
|
@ -392,7 +392,7 @@ in @code{make-text-wrapper}."
|
|||
|
||||
(define (fill-string str . kwargs)
|
||||
"Wraps the text given in string @var{str} according to the parameters
|
||||
provided in @var{keywds}, or the default setting if they are not
|
||||
provided in @var{kwargs}, or the default setting if they are not
|
||||
given. Returns a single string with the wrapped text. Valid keyword
|
||||
arguments are discussed in @code{make-text-wrapper}."
|
||||
(string-join (apply string->wrapped-lines str kwargs)
|
||||
|
|
|
@ -205,7 +205,7 @@ header with name @var{sym}."
|
|||
(define (write-header sym val port)
|
||||
"Writes the given header name and value to @var{port}. If @var{sym}
|
||||
is a known header, uses the specific writer registered for that header.
|
||||
Otherwise the value is written using @var{display}."
|
||||
Otherwise the value is written using @code{display}."
|
||||
(display (header->string sym) port)
|
||||
(display ": " port)
|
||||
((header-writer sym) val port)
|
||||
|
|
|
@ -217,7 +217,7 @@ on @var{port}, perhaps using some transfer encoding."
|
|||
(bytevector-length bv) nbytes))))))
|
||||
|
||||
(define (write-request-body r bv)
|
||||
"Write @var{body}, a bytevector, to the port corresponding to the HTTP
|
||||
"Write @var{bv}, a bytevector, to the port corresponding to the HTTP
|
||||
request @var{r}."
|
||||
(put-bytevector (request-port r) bv))
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ on @var{port}, perhaps using some transfer encoding."
|
|||
(bytevector-length bv) nbytes))))))
|
||||
|
||||
(define (write-response-body r bv)
|
||||
"Write @var{body}, a bytevector, to the port corresponding to the HTTP
|
||||
"Write @var{bv}, a bytevector, to the port corresponding to the HTTP
|
||||
response @var{r}."
|
||||
(put-bytevector (response-port r) bv))
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ it succeeded."
|
|||
(define (run-vm-tests files)
|
||||
"For each file listed in @var{files}, load it and run it through both the
|
||||
interpreter and the VM (after having it compiled). Both results must be
|
||||
equal in the sense of @var{equal?}."
|
||||
equal in the sense of @code{equal?}."
|
||||
(let* ((res (map (lambda (file)
|
||||
(format #t "running `~a'... " file)
|
||||
(if (catch #t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue