1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

Consume a peeked EOF at the REPL.

* module/system/repl/repl.scm (meta-reader): Consume peeked EOF.
This commit is contained in:
Mark H Weaver 2013-04-08 08:44:02 -04:00
parent 7f3be1db99
commit 7520a9b95d

View file

@ -87,12 +87,9 @@
(lambda ()
(let ((ch (flush-leading-whitespace)))
(cond ((eof-object? ch)
;; EOF objects are not buffered. It's quite possible
;; to peek an EOF then read something else. It's
;; strange but it's how it works.
ch)
(read-char)) ; consume the EOF and return it
((eqv? ch #\,)
(read-char port)
(read-char)
meta-command-token)
((read-comment lang port ch)
*unspecified*)