From: Andy Wingo Date: Thu, 18 Sep 2008 18:05:23 +0000 (+0200) Subject: fix case in which we can fail to exit the repl cleanly X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/d600df9aa9c9afd072f066736964a2f013e0fbe3 fix case in which we can fail to exit the repl cleanly * module/system/repl/repl.scm (next-char): Don't throw if we get an EOF, just return the EOF object. Fixes a case in which we fail to exit cleanly. --- diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm index f9d17cdab..69a47f387 100644 --- a/module/system/repl/repl.scm +++ b/module/system/repl/repl.scm @@ -141,7 +141,7 @@ (define (next-char wait) (if (or wait (char-ready?)) (let ((ch (peek-char))) - (cond ((eof-object? ch) (newline) (throw 'quit)) + (cond ((eof-object? ch) ch) ((char-whitespace? ch) (read-char) (next-char wait)) (else ch))) #f))