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

"When doesn't unwind-protect?" (or) "Oh where, oh where did my End-Of-File go?"



A:  When the reader does the unwinding!
Seriously now...
  I am always gettinng shafted because EOF is not detected nicely
inside a (toplevel) readmacro.  It just punts out to the READ, and
quietly returns the eof-val.  This happens also with vertical-bars,
and used to happen with ";", except that that was "fixed" (in a nifty
way which is inaccessible to the lisp user).  Now, i COULD go and
calculate the input file (from ^Q and INFILE) and call TYI explicitly
on that, but due to the particularly winning and general way in which
the ascii input code in newio was implemented, this ups the time
taken in TYI by somewhere between one and two orders of magnitude,
because it will then do an inbind/eofbind on me for each tyi.
  So, i thought to myself, first i'll see if i can trap it with a
CATCHALL.  Well, that showed no results, but then i didn't really think
it would.  So i tried an unwind-protect.  SURPRISE!  Look ma, no
unwinding!  TYIMAN must really think he's something to have such
privileged treatment.