From f68a453a41aef9192cd3ae1a3b7bf1399fb1bc48 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 24 Apr 2010 21:31:36 -0700 Subject: [PATCH] Handle case where INPUT-LINE port operation isn't available; was breaking use of comments in Edwin evaluation. --- src/runtime/parse.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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)) -- 2.25.1