> From: Andy Wingo <[email protected]>
> To: Mike Gran <[email protected]>
> Cc: Guile User <[email protected]>
> Sent: Monday, January 9, 2012 9:35 AM
> Subject: Re: gh_repl
> 
> On Sun 25 Sep 2011 05:54, Mike Gran <[email protected]> writes:
> 
>>  What is the replacement for gh_repl?
> 
> I don't know!  When I started with Guile in 2003 I think the GH API was
> already deprecated :)
> 
>>  Which is to say, if I'm using Guile as an extension language, what
>>  command should I execute in C to drop me into the Guile REPL?
> 
> What should happen when the user does a C-d at the REPL?  If the answer
> is that the application quits, then it's probably scm_shell().
> Otherwise there isn't a very good answer.
> 
> scm_call_1 (scm_public_ref ("ice-9 top-repl", "top-repl")) ?
> 
> Do we need a better answer here? :)

For guile-2.0, I eventually settled on 
 
scm_call_1 (scm_c_public_ref ("system repl repl", "start-repl"),
   scm_from_locale_symbol ("scheme"));
 
This trick I learned from this e-mail from Tristan
 
http://lists.gnu.org/archive/html/bug-guile/2011-10/msg00040.html
 
And with that, ",q" returns control to the calling C function.
 
(I'm in a push to release a new rev of everything I've ever done in 2012.
I'd like to get to the point where all my guile-1.8 using progs only use
functions documented in the 1.8 manual and ditto for guile-2.0)
 
Thanks,
 
Mike

Reply via email to