I'm trying to learn Lisp by reading Practical Common Lisp and I've hit a small stumbling block early on when trying to read user input. I've defined prompt-read to prompt the user for input:
(defun prompt-read (prompt)
(format *query-io* "~a: " prompt)
(force-output *query-io*)
(read-line *query-io*))
When I try to evaluate prompt-read, pressing [Enter] to run the statement seems to be accepted as the input so the resulting input is blank
>(prompt-read "Test")
Test:
""
NIL
I followed the example exactly, so I'm assuming that this is somehow related to my environment. I am using Emacs Inferior Lisp in Windows, is there some adjustment I have to make to my code in order to get the behavior I expect?