diff options
author | Dan Leslie <dan@ironoxide.ca> | 2018-11-12 23:48:43 -0800 |
---|---|---|
committer | Dan Leslie <dan@ironoxide.ca> | 2018-11-12 23:48:43 -0800 |
commit | 55f404607c503d8fe7d0b187f064e29667ac1496 (patch) | |
tree | c3150fea3af3a42e74baa8c30626d493480a8629 | |
parent | fd41ea8fc8d6d49782fb79d5971cdecb04cc1115 (diff) | |
download | geiser-guile-55f404607c503d8fe7d0b187f064e29667ac1496.tar.gz geiser-guile-55f404607c503d8fe7d0b187f064e29667ac1496.tar.bz2 |
Fixes autodoc in Chicken, #258
-rw-r--r-- | scheme/chicken/geiser/chicken5.scm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/scheme/chicken/geiser/chicken5.scm b/scheme/chicken/geiser/chicken5.scm index 6c8ceae..5409058 100644 --- a/scheme/chicken/geiser/chicken5.scm +++ b/scheme/chicken/geiser/chicken5.scm @@ -142,11 +142,18 @@ (newline))) (define (eval* str) - (handle-exceptions exn #f - (with-all-output-to-string - (eval - (with-input-from-string (->string str) - (lambda () (read))))))) + (cond + ((string? str) + (handle-exceptions exn + (with-all-output-to-string (write-exception exn)) + (eval + (with-input-from-string str + (lambda () (read)))))) + ((symbol? str) + (handle-exceptions exn + (with-all-output-to-string (write-exception exn)) + (eval str))) + (else (eval* (->string str))))) (define (fmt node) (let* ((mod (cadr node)) |