[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-46-gdcb7c7
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-46-gdcb7c7d |
Date: |
Sun, 27 Feb 2011 22:21:08 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=dcb7c7ddf5dc2c7e32720ed91c6d7bbed7f7455a
The branch, stable-2.0 has been updated
via dcb7c7ddf5dc2c7e32720ed91c6d7bbed7f7455a (commit)
from 4e33a13246751034adbcc53f9e93223e19f57db2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dcb7c7ddf5dc2c7e32720ed91c6d7bbed7f7455a
Author: Andy Wingo <address@hidden>
Date: Sun Feb 27 23:26:08 2011 +0100
flush all input on a read error
* module/system/repl/repl.scm (flush-all-input): New helper.
(prompting-meta-read): Flush all input on a read error, as we could be
within some expression or a string or something.
-----------------------------------------------------------------------
Summary of changes:
module/system/repl/repl.scm | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index 6eb29be..0d7aca7 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -54,6 +54,13 @@
meta-command-token)
(else (read port env))))))))
+(define (flush-all-input)
+ (if (and (char-ready?)
+ (not (eof-object? (peek-char))))
+ (begin
+ (read-char)
+ (flush-all-input))))
+
;; repl-reader is a function defined in boot-9.scm, and is replaced by
;; something else if readline has been activated. much of this hoopla is
;; to be able to re-use the existing readline machinery.
@@ -72,6 +79,7 @@
(else
(format (current-output-port) "While reading expression:\n")
(print-exception (current-output-port) #f key args)
+ (flush-all-input)
*unspecified*)))))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-46-gdcb7c7d,
Andy Wingo <=