Hi Ludovic,
Thanks for the suggestion. I likely never would have found
save-module-excursion on my own.
Ludovic Courtès wrote:
And no, it's not documented (patch welcome! ;-)).
Here we are: (attached)
Regards,
Jon
Index: api-modules.texi
===================================================================
RCS file: /sources/guile/guile/guile-core/doc/ref/api-modules.texi,v
retrieving revision 1.16
diff -r1.16 api-modules.texi
604a605,616
> @deffn {Scheme Procedure} save-module-excursion thunk
> Allows you to change the current module temporarily in a continuation-safe
> manner. Presumably, you will call @code{set-current-module} within @var{thunk}.
>
> Call @var{thunk} within a @code{dynamic-wind}. If @var{thunk} escapes non-locally,
> the current module (at the time of escape) is saved, and the original
> current module (at the time @var{thunk}'s dynamic extent was last entered)
> is restored. If @var{thunk}'s dynamic extent is re-entered, then the
> current module is saved, and the previously saved inner module is set
> current again.
> @end deffn
>
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user