This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fluids.c docs


Keisuke Nishida <kxn30@po.cwru.edu> writes:

>   SCM_DEFINE (scm_make_fluid, "make-fluid", 0, 0, 0, 
> ! 	    (),
> ! 	    "Return a newly created fluid.\n"
> ! 	    "Fluids are objects of a certain type (a smob) that can hold one SCM\n"

I think I would remove "of a certain type (a smob)" now.  That phrase
is not wrong but it doesn't carry essential information and might be
confusing.

>   SCM_DEFINE (scm_fluid_ref, "fluid-ref", 1, 0, 0, 
> ! 	    (SCM fluid),
> ! 	    "Return the value associated with @var{fluid} in the current dynamic root.\n"
> ! 	    "If @var{fluid} has not been set, then this returns #f.")

Maybe we could add "has not been set in the current dynamic root".

>   SCM_DEFINE (scm_with_fluids, "with-fluids*", 3, 0, 0, 
> ! 	    (SCM fluids, SCM values, SCM thunk),
> ! 	    "Set @var{fluids} to @var{values} temporary, and call @var{thunk}.\n"

Maybe continue with the text from NEWS:

    FLUIDS is a list of fluids and VALUES a corresponding list of
    values for these fluids.  Before THUNK gets called the values are
    installed in the fluids and the old values of the fluids are saved
    in the VALUES list.  When the flow of control leaves THUNK or
    reenters it, the values get swapped again.  Note that the VALUES
    list is modified by `with-fluids*'.

I will commit your patch with these changes.  Thanks!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]