On the debbugs mailinglist, Andy Wingo pretty much replied "will not fix" to this bug.
Fortunately for src/kernel, we already have the mechanisms to put wrappers around ports. On Guile they're no-ops, but it is trivial to modify them. The sketch is as follows (I'll implement them later when I have time and access to my hack computer): 1. Modify make-read to have its returned function wrap a cons-cell (or single-item vector) around the port. That cons cell's car is a port normally, but is replaced with the eof object if ever read-char or peek-char receive an eof object 2. Modify invoke-read to unwrap it, unless the cons-cell contains an eof instead of a port (in which case return the EOF verbatim). 3. Modify my-peek-char and my-read-char to check (eof-object? (car port)) and return (car port) if so. Otherwise execute the core peek-char or read-char on the actual port, check if the return value is eof, and replace the car if so. 4. Put a guard on get-sourceinfo and have it return a nil if already at EOF. Modify attach-sourceinfo similarly so that if pos is a nil then return just the object. ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss