This is the mail archive of the guile@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: readline support


Jim Blandy <jimb@red-bean.com> writes:
> If I can see some quick, groovy workaround, then I'll take it, but
> it's not a high priority at the moment.

It should be easy to fix so only the first line gets a prompt.
I haven't actually looked at the implementation, but something
like this should work:

int should_prompt;
get_line ()  /* this is what gets called by the reader */
{
  readline (should_prompt ? "Guile>" : "");
  should_prompt = 0;
}

repl()
{
  for(;;)
   {
    should_prompt = 1;
    SCM exp = read ();
    print (eval (exp));
   }
}

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner