original commit: c2e72bc118510ff97bd7b631ae49881e974c59ce
This commit is contained in:
Robby Findler 2004-01-14 16:44:45 +00:00
parent dd84f014e1
commit ced1001106

View File

@ -47,7 +47,8 @@
(opt-lambda (text [start 0] [in-end #f])
(let* ([end (or in-end (send text last-position))]
[port (open-input-text-editor text start end)])
(with-handlers ([exn:read? (lambda (x) #f)])
(with-handlers ([exn:read:eof? (lambda (x) #f)]
[exn:read? (lambda (x) #t)])
(let loop ()
(let ([s (read port)])
(or (eof-object? s)