--- Begin Message ---
Subject: |
Patch: Make notation for Scheme variable-length arguments more consistent in manual. |
Date: |
Sun, 15 Jan 2012 14:32:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
The attached patch makes notation for Scheme repeated arguments
more consistent in the manual.(*)
Some examples from the patch include:
----------------------------------------------------------------------
1. address@hidden {Scheme Procedure} apply proc arg1 @dots{} argN arglst
address@hidden {Scheme Procedure} apply proc arg @dots{} arglst
For those who don't know, the above definition header lines in Texinfo
markup advise how to call 'apply'. In Texinfo 'arg1 @dots{}'
stands for any number of actual arguments that the caller can use,
including zero arguments. Thus, 'argN' and 'arglst' are mandatory. But
this conflicts with the formal specifation for 'apply' (which is what
Guile has implemented), hence the replacement.
2. address@hidden {Scheme Procedure} weak-vector . l
address@hidden {Scheme Procedure} weak-vector elem @dots{}
@deffnx {Scheme Procedure} list->weak-vector l
@deffnx {C Function} scm_weak_vector (l)
The dot notation here is not Texinfo "metasyntax" like '@dots' or '[]'.
Instead, it functions here as Scheme metasyntax to indicate a rest
parameter. This nicely corresponds with the C counterpart, but it is
just one more hurdle for novices who may not be used to rest parameters.
3. address@hidden {Scheme Procedure} transpose-array array dim1 @dots{}
address@hidden {Scheme Procedure} transpose-array array dim1 dim2 @dots{}
'transpose-array' takes at least one argument.
4. address@hidden {Scheme Procedure} vlist-append vlists ...
address@hidden {Scheme Procedure} vlist-append vlist @dots{}
The ellipses imply zero or more, so the plural 'vlists' only confuses
here.
5. address@hidden {Scheme Procedure} make-struct vtable tail-size [init...]
address@hidden {Scheme Procedure} make-struct vtable tail-size init @dots{}
'init...' imply zero or more, making '[init...]' redundant.
----------------------------------------------------------------------
I realize that my patches so far still leave blatant inconsistencies
such as '...' instead of '@dots{}'. I will include such a change in a
"typographical" improvement kind of patch.
* Bug #9973
http://lists.gnu.org/archive/html/bug-guile/2011-11/msg00002.html
0001-Make-notation-for-Scheme-repeated-arguments-more-con.patch
Description: Make notation for Scheme variable-length arguments more consistent in manual
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#10517: Corrected patch: Make notation for Scheme variable-length arguments more consistent in manual. |
Date: |
Fri, 03 Feb 2012 13:05:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
On Sun 15 Jan 2012 20:49, Bake Timmons <address@hidden> writes:
> I'm sorry for that previous patch which included some typos. The fixed
> patch is attached. Thanks!
Hum, I had applied your original patch already, resolving a conflict due
to the Parameters move; saw one typo in srfi-modules.texi and fixed it.
Hope that was OK.
In the future it's best to either use the same bug, by replying to the
mail that debbugs sends you, or to close the previous bug. That way
people can opportunistically deal with one bug without having to look at
all bugs :-)
Cheers,
Andy
--
http://wingolog.org/
--- End Message ---