[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: REM at MIT-MC
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Thu, 18 Nov 82 17:19:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 18 November 1982 12:19-EST
Date: 18 November 1982 09:49-EST
From: Robert Elton Maas <REM>
Sometimes when I ctrl-S to stop output it never comes back on even
though I've typed new stuff which echos just fine -- what do I have to
type to undo a ctrl-S? (I conjecture the read-eval-print loop turns it
back on but ordinary READLINE in a user program doesn't.)
That's right, READLINE will not re-enable output. The mechanism is:
Output is disabled by setting the variable ^W (uparrow W, not C-W) to T
and re-enabled by setting it to NIL.
The control character c-W sets ^W to T.
The control character c-V sets ^W to NIL.
The control character c-S, like c-W, sets ^W to T, but has the additional
effect that when seen by the reader at READ (not READLINE, TYI, etc) time
sets ^W back to NIL. The reason that it only works at READ time is that
it works via STATUS MACRO; ie, (STATUS MACRO #^S) => +INTERNAL-^S-MACRO
which is described roughly by (LAMBDA (NIL NIL) (SETQ ^W NIL) NIL).
Note that this macro is a splicing macro and consequently causes a token
break. (AB) is read as (A B) while (AB) is read as (AB).
Note further that (READLINE) does not ignore any of the characters
, , or . This may imply that you want to write your own READLINE
that does (a) discard and when it sees them and (b) set ^W back to
NIL when it sees and then discard the .
Hope this answers some of your questions along these lines.