1
Fork 0
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:
Bake Timmons 2012-01-11 23:55:18 -05:00 committed by Andy Wingo
parent b7e64f8b26
commit 91a214ebd9
10 changed files with 16 additions and 16 deletions

View file

@ -161,7 +161,7 @@ non-locally, that exit determines the continuation."
(set! with-throw-handler (set! with-throw-handler
(lambda (k thunk pre-unwind-handler) (lambda (k thunk pre-unwind-handler)
"Add @var{handler} to the dynamic context as a throw 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))) (if (not (or (symbol? k) (eqv? k #t)))
(scm-error 'wrong-type-arg "with-throw-handler" (scm-error 'wrong-type-arg "with-throw-handler"
"Wrong type argument in position ~a: ~a" "Wrong type argument in position ~a: ~a"

View file

@ -136,7 +136,7 @@
"Executes the program @var{command} with optional arguments "Executes the program @var{command} with optional arguments
@var{args} (all strings) in a subprocess. @var{args} (all strings) in a subprocess.
A port to the process (based on pipes) is created and returned. 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 port to the process is created: it should be the value of
@code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}." @code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}."
(let* ((port/pid (apply open-process mode command args)) (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) (define (open-pipe command mode)
"Executes the shell command @var{command} (a string) in a subprocess. "Executes the shell command @var{command} (a string) in a subprocess.
A port to the process (based on pipes) is created and returned. 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 port to the process is created: it should be the value of
@code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}." @code{OPEN_READ}, @code{OPEN_WRITE} or @code{OPEN_BOTH}."
(open-pipe* mode "/bin/sh" "-c" command)) (open-pipe* mode "/bin/sh" "-c" command))

View file

@ -298,7 +298,7 @@ port directly after OBJ, like (pretty-print OBJ PORT)."
(width 79) (width 79)
(display? #f) (display? #f)
(breadth-first? #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 into @var{width} characters. By default, @var{x} will be printed using
@code{write}, though that behavior can be overriden via the @code{write}, though that behavior can be overriden via the
@var{display?} keyword argument. @var{display?} keyword argument.

View file

@ -39,14 +39,14 @@
(@call-with-values producer consumer)) (@call-with-values producer consumer))
(define (dynamic-wind in thunk out) (define (dynamic-wind in thunk out)
"All three arguments must be 0-argument procedures. "All three arguments must be 0-argument procedures.
@var{in_guard} is called, then @var{thunk}, then Guard @var{in} is called, then @var{thunk}, then
@var{out_guard}. guard @var{out}.
If, any time during the execution of @var{thunk}, the If, any time during the execution of @var{thunk}, the
continuation of the @code{dynamic_wind} expression is escaped continuation of the @code{dynamic_wind} expression is escaped
non-locally, @var{out_guard} is called. If the continuation of non-locally, @var{out} is called. If the continuation of
the dynamic-wind is re-entered, @var{in_guard} is called. Thus the dynamic-wind is re-entered, @var{in} is called. Thus
@var{in_guard} and @var{out_guard} may be called any number of @var{in} and @var{out} may be called any number of
times. times.
@lisp @lisp
(define x 'normal-binding) (define x 'normal-binding)

View file

@ -237,7 +237,7 @@ if the port has no transcoder."
(not (port-encoding port))) (not (port-encoding port)))
(define (textual-port? 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." Guile."
#t) #t)

View file

@ -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 defaults to @samp{#\\space}. If @var{rchr} is provided, then the
padding to the right will use it instead. See the examples below. 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 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. never truncated.
@lisp @lisp
(center-string \"Richard Todd\" 24) (center-string \"Richard Todd\" 24)
@ -392,7 +392,7 @@ in @code{make-text-wrapper}."
(define (fill-string str . kwargs) (define (fill-string str . kwargs)
"Wraps the text given in string @var{str} according to the parameters "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 given. Returns a single string with the wrapped text. Valid keyword
arguments are discussed in @code{make-text-wrapper}." arguments are discussed in @code{make-text-wrapper}."
(string-join (apply string->wrapped-lines str kwargs) (string-join (apply string->wrapped-lines str kwargs)

View file

@ -205,7 +205,7 @@ header with name @var{sym}."
(define (write-header sym val port) (define (write-header sym val port)
"Writes the given header name and value to @var{port}. If @var{sym} "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. 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 (header->string sym) port)
(display ": " port) (display ": " port)
((header-writer sym) val port) ((header-writer sym) val port)

View file

@ -217,7 +217,7 @@ on @var{port}, perhaps using some transfer encoding."
(bytevector-length bv) nbytes)))))) (bytevector-length bv) nbytes))))))
(define (write-request-body r bv) (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}." request @var{r}."
(put-bytevector (request-port r) bv)) (put-bytevector (request-port r) bv))

View file

@ -226,7 +226,7 @@ on @var{port}, perhaps using some transfer encoding."
(bytevector-length bv) nbytes)))))) (bytevector-length bv) nbytes))))))
(define (write-response-body r bv) (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}." response @var{r}."
(put-bytevector (response-port r) bv)) (put-bytevector (response-port r) bv))

View file

@ -67,7 +67,7 @@ it succeeded."
(define (run-vm-tests files) (define (run-vm-tests files)
"For each file listed in @var{files}, load it and run it through both the "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 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) (let* ((res (map (lambda (file)
(format #t "running `~a'... " file) (format #t "running `~a'... " file)
(if (catch #t (if (catch #t