From: Chris Hanson Date: Sun, 25 Apr 2010 04:31:36 +0000 (-0700) Subject: Handle case where INPUT-LINE port operation isn't available; was X-Git-Tag: 20100708-Gtk~66^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f68a453a41aef9192cd3ae1a3b7bf1399fb1bc48;p=mit-scheme.git Handle case where INPUT-LINE port operation isn't available; was breaking use of comments in Edwin evaluation. --- diff --git a/src/runtime/parse.scm b/src/runtime/parse.scm index 5d5ece9e8..17bbca3ba 100644 --- a/src/runtime/parse.scm +++ b/src/runtime/parse.scm @@ -248,7 +248,9 @@ USA. (else (discard action))))) ;; If we're past the second line, just discard. - (if (and (< (current-line port db) 2) + (if (and (let ((line (current-line port db))) + (and line + (< line 2))) (db-enable-file-attributes-parsing db)) (scan) (discard continue-parsing))) @@ -829,8 +831,11 @@ USA. default) default))) -(define-integrable (current-line port db) - ((db-input-line db) port)) +(define (current-line port db) + (let ((proc (db-input-line db))) + (if proc + (proc port) + #f))) (define-integrable (current-position port db) ((db-get-position db) port))