emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-gauche 6da3f02 011/119: Fix geiser:eval


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-gauche 6da3f02 011/119: Fix geiser:eval
Date: Sun, 1 Aug 2021 18:27:48 -0400 (EDT)

branch: elpa/geiser-gauche
commit 6da3f0224d488a682c898f0d65c308199c63c83f
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>

    Fix geiser:eval
---
 geiser.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/geiser.scm b/geiser.scm
index 0388a2e..9e7cd69 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -29,12 +29,19 @@
   (with-output-to-string
     (cut pprint (macroexpand form))))
 
+
 (define (geiser:eval module-name form . rest)
-  (let ((module (or (and (symbol? module-name )
+  rest
+  (let* ((output (open-output-string))
+         (module (or (and (symbol? module-name )
                         (find-module module-name))
-                   (find-module 'user))))
-    (with-output-to-string
-      (cut eval form module))))
+                   (find-module 'user)))
+         (result (with-output-to-port output
+                   (lambda ()
+                     (eval form module)))))
+    (write `((result ,(write-to-string result))
+             (output . ,(get-output-string output))))))
+
 
 (define (geiser:autodoc ids . rest)
   (map (cut ~ <> 'info)
@@ -68,3 +75,4 @@
    (cut string-prefix? prefix <>)
    (map (^x (symbol->string (module-name x)))
        (all-modules))))
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]