HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f3be1d
)
Consume a peeked EOF at the REPL.
author
Mark H Weaver
<mhw@netris.org>
Mon, 8 Apr 2013 12:44:02 +0000
(08:44 -0400)
committer
Mark H Weaver
<mhw@netris.org>
Mon, 8 Apr 2013 12:44:02 +0000
(08:44 -0400)
* module/system/repl/repl.scm (meta-reader): Consume peeked EOF.
module/system/repl/repl.scm
patch
|
blob
|
blame
|
history
diff --git
a/module/system/repl/repl.scm
b/module/system/repl/repl.scm
index
7d2b7c8
..
1649556
100644
(file)
--- a/
module/system/repl/repl.scm
+++ b/
module/system/repl/repl.scm
@@
-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*)