[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (read) reads an s-exp without Return
- To: Yasuaki Honda <honda@csl.sony.co.jp>
- Subject: Re: (read) reads an s-exp without Return
- From: takuo@is.s.u-tokyo.ac.jp
- Date: Tue, 02 Oct 90 14:48:15 +0900
- Cc: info-macl@cambridge.apple.com
- In-reply-to: Your message of "Tue, 02 Oct 90 10:23:50 +0900." <9010020124.AA22127@scorpio.csl.sony.co.jp>
- Reply-to: takuo@is.s.u-tokyo.ac.jp
Hello, Honda-kun
> 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.
Yes! I had the same problem. The following function (read-form) works fine.
This requires hitting the return key as the MACL toplevel. Of course, input
editing works well.
(defun read-form (prompt &optional (stream *terminal-io*))
(let ((*listener-prompt-hook* #'(lambda () (princ prompt stream))))
(ask stream (ccl::get-next-form))))
---
Takuo Watanabe : takuo@is.s.u-tokyo.ac.jp
Department of Information Science, Tokyo Institute of Technology