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

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

[nongnu] elpa/geiser-guile 2ac3f91 027/284: Play nice with (ice-9 histor


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile 2ac3f91 027/284: Play nice with (ice-9 history) by using WRITE to return values to Emacs.
Date: Sun, 1 Aug 2021 18:29:09 -0400 (EDT)

branch: elpa/geiser-guile
commit 2ac3f911a36efe0589a6fa8b62305bd6985851ed
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Play nice with (ice-9 history) by using WRITE to return values to Emacs.
---
 geiser/emacs.scm | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/geiser/emacs.scm b/geiser/emacs.scm
index 078d5ed..3c66eb2 100644
--- a/geiser/emacs.scm
+++ b/geiser/emacs.scm
@@ -39,11 +39,13 @@
   #:use-module (srfi srfi-1)
   #:use-module ((geiser introspection) :renamer (symbol-prefix-proc 'ge:)))
 
-(define (make-result result output)
-  (list (cons 'result result) (cons 'output output)))
+(define (write-result result output)
+  (write (list (cons 'result result) (cons 'output output)))
+  (newline))
 
-(define (error-handler key . args)
-  (list (cons 'error (apply parse-error (cons key args)))))
+(define (write-error key . args)
+  (write (list (cons 'error (apply parse-error (cons key args)))))
+  (newline))
 
 (define (parse-error key . args)
   (let* ((len (length args))
@@ -73,8 +75,8 @@ SUBR, MSG and REST."
                  (with-output-to-string
                    (lambda ()
                      (set! result (eval form module))))))
-            (make-result result output))))
-      error-handler)))
+            (write-result result output))))
+      write-error)))
 
 (define (ge:compile form module-name)
   "Compiles @var{form} in the module designated by @var{module-name}.
@@ -96,8 +98,8 @@ SUBR, MSG and REST."
                       (lambda ()
                         (set-current-module module)
                         (set! result (compile form))))))))
-            (make-result result output))))
-      error-handler)))
+            (write-result result output))))
+      write-error)))
 
 (define (ge:compile-file path)
   "Compile and load file, given its full @var{path}."



reply via email to

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