summaryrefslogtreecommitdiff
path: root/elisp/geiser-connection.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-02-09 23:49:50 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-02-09 23:49:50 +0100
commit9db33cc8c9366d71071610209dcb4c655eaa6e1f (patch)
tree695088b4f2205d242e115fe291d03369b2de9513 /elisp/geiser-connection.el
parentba949ae16887950bcd49e70a0fe6c6abbfda9177 (diff)
downloadgeiser-9db33cc8c9366d71071610209dcb4c655eaa6e1f.tar.gz
geiser-9db33cc8c9366d71071610209dcb4c655eaa6e1f.tar.bz2
More robust retort detection
Some schemes (okay, Guile) may output spurious messages besides a well-formed retort. This will be eventually fixed; in the meantime, we try to skip the noise (and may fail miserably if that noise has a form similar to the signal we search).
Diffstat (limited to 'elisp/geiser-connection.el')
-rw-r--r--elisp/geiser-connection.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index cade18a..d3c99cb 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -1,6 +1,6 @@
;;; geiser-connection.el -- talking to a scheme process
-;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -184,7 +184,9 @@
`((error (key . geiser-debugger))
(output . ,answer))
(condition-case err
- (let ((form (car (read-from-string answer))))
+ (let* ((start (and (string-match "((\\(?:result\\|error\\)" answer)
+ (match-beginning 0)))
+ (form (car (read-from-string answer start))))
(and (listp form) form))
(error `((error (key . geiser-con-error))
(output . ,(format "%s\n(%s)"