summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-connection.el14
-rw-r--r--scheme/guile/geiser/evaluation.scm8
2 files changed, 8 insertions, 14 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 69dd6a9..e466cd3 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -156,7 +156,8 @@
(defun geiser-con--has-entered-debugger (con answer)
(and (not (geiser-con--connection-is-debugging con))
- (geiser-con--connection-update-debugging con answer)))
+ (let ((p (car (last (split-string answer "\n" t)))))
+ (and p (geiser-con--connection-update-debugging con p)))))
(defun geiser-con--connection-eot-p (con txt)
(and txt
@@ -201,15 +202,12 @@
`((error (key . geiser-debugger))
(output . ,answer))
(condition-case err
- (let* ((start (string-match "((\\(?:result)?\\|error\\) " answer))
- (form (or (and start (car (read-from-string answer start)))
- `((error (key . retort-syntax))
- (output . ,answer)))))
- form)
+ (let ((start (string-match "((\\(?:result)?\\|error\\) " answer)))
+ (or (and start (car (read-from-string answer start)))
+ `((error (key . retort-syntax)) (output . ,answer))))
(error `((error (key . geiser-con-error))
(output . ,(format "%s\n(%s)"
- answer
- (error-message-string err)))))))))
+ answer (error-message-string err)))))))))
(defun geiser-con--process-completed-request (req answer)
(let ((cont (geiser-con--request-continuation req))
diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm
index ea4071d..4c87532 100644
--- a/scheme/guile/geiser/evaluation.scm
+++ b/scheme/guile/geiser/evaluation.scm
@@ -49,11 +49,6 @@
(ge:set-warnings 'none)
-(define (stringify obj)
- (object->string obj
- (lambda (o . ps)
- (pretty-print o (car ps) #:max-expr-width 100))))
-
(define (call-with-result thunk)
(letrec* ((result #f)
(output
@@ -62,7 +57,8 @@
(with-fluids ((*current-warning-port* (current-output-port))
(*current-warning-prefix* ""))
(with-error-to-port (current-output-port)
- (lambda () (set! result (map stringify (thunk))))))))))
+ (lambda () (set! result
+ (map object->string (thunk))))))))))
(write `((result ,@result) (output . ,output)))
(newline)))