diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-20 20:55:39 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-20 20:55:39 +0100 |
commit | 2ac3f911a36efe0589a6fa8b62305bd6985851ed (patch) | |
tree | 3e6bbfef8ee1be1a6850c32907240409300e6c72 | |
parent | 3655a742863cf260c182d7f707f95b643e9e4d9b (diff) | |
download | geiser-guile-2ac3f911a36efe0589a6fa8b62305bd6985851ed.tar.gz geiser-guile-2ac3f911a36efe0589a6fa8b62305bd6985851ed.tar.bz2 |
Play nice with (ice-9 history) by using WRITE to return values to Emacs.
-rw-r--r-- | geiser/emacs.scm | 18 |
1 files 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}." |