[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(read) reads an s-exp without Return

Many of you maybe know that (read) returns the s-exp which was read
from *standard-input* as quickly as possible. That is, evaluation of
(read) returns immidiately after all the close parentheses of the
s-exp are entered without hitting return key.

	? (read)
	()		;; As soon as I enter the close parenthesis,
	nil		;; nil is returned.
This is very similar to the behavior of Symbolics' toplevel. 
Currently, I am writing my own toplevel function for my new language
and the toplevel function, which is using (read), works very fine for
people like real lisp hackers.

BUT, for those who are familiar with UNIX, this behavior seems very
strange. They want to input commands followed by hitting return keys.

So, if anyone of you know how to change the behavior of read function
to very ordinal one, which is, (read) function returns after hitting
the return key, please inform me.

Yasuaki Honda
SONY Computer Science Laboratory Inc.