On Wed, Nov 10, 2010 at 01:36:00PM -0700, Matt wrote:
> I've been working through the book "On Lisp" trying to follow the code
> for the utilities to make sure I understand how they work.  I've
> noticed something about the prompt utility.  If I enter:
> 
> (defun prompt (&rest args)
>   (apply #'format *query-io* args)
>   (read *query-io*))
> 
> and then try at the prompt:
> 
> (prompt ">> ")
> 
> I get a blank line and once I enter a lisp expression it will evaluate
> it and print like the following:
> 
> * (prompt ">> ")
> (+ 1 2)
> >> 3
> *
> 
> However in clisp the following will happen
> 
> [1] (prompt ">> ")
> >> (+ 1 2)
> 3
> 
> Which is what I expected.  Can anybody tell me if there is a different
> variable I should be using in sbcl or some other way t

Hmm, are you trying this from a REPL or from slime?
You might want to add 

 (force-output *query-io*)

after (apply ...) in your code.

 HTH Ralf Mattes



> Gardeners mailing list
> [email protected]
> http://www.lispniks.com/mailman/listinfo/gardeners
_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners

Reply via email to