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

Does READ-CHAR echo?

I could not find any place in CLtL where it says whether READ-CHAR echos
the character that it has read. Likewise for PEEK-CHAR. Also, there is
no discussion of whether UNREAD-CHAR should unecho the character.

I note that Symbolics Common Lisp has (somewhat arbitrarily, I guess)
decided that READ-CHAR echos, PEEK-CHAR does not echo, and UNREAD-CHAR
does not un-echo the character. This has the odd effect that:

echos the character twice. I imagine it will be a real hassle when programs
start porting if this behavior does not become standardized.

Does anyone have any thoughts about whether we should think about adding
Or maybe there should be WITH-INPUT-ECHO and WITHOUT-INPUT-ECHO special forms
which affect calls to the character readers within the dynamic scope of their

I kind of assume that we all agree that READ and READ-LINE should echo
the characters as they come in from an interactive terminal. Perhaps,
we should state that explicitly in the next edition of the manual.

I believe Carl Hoffman (who wrote the Lisp Machine rubout handler) has 
some thoughts on this, which I hope this letter will spur him to share with us.