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 | 5d6dd6f7e7c9f8abddfc59acf3f3318f594afb22 (patch) | |
tree | 0c6e94996cc9eeedb35a59ef4e741aa0a2904e70 /scheme/guile/geiser | |
parent | a295bf5b45e3e1a38516120af0fa60d6594d7083 (diff) | |
download | geiser-chez-5d6dd6f7e7c9f8abddfc59acf3f3318f594afb22.tar.gz geiser-chez-5d6dd6f7e7c9f8abddfc59acf3f3318f594afb22.tar.bz2 |
Play nice with (ice-9 history) by using WRITE to return values to Emacs.
Diffstat (limited to 'scheme/guile/geiser')
-rw-r--r-- | scheme/guile/geiser/emacs.scm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm index 078d5ed..3c66eb2 100644 --- a/scheme/guile/geiser/emacs.scm +++ b/scheme/guile/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}." |