summaryrefslogtreecommitdiff
path: root/elisp/geiser-connection.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-12 15:41:06 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-12 15:41:06 +0100
commitc4287cdbb796507575a71a2bfc589f0f107f436f (patch)
treeae2be0f6ffe5b6ae85a3ad1ce8de898e77d2ec2e /elisp/geiser-connection.el
parente13172c2855cc7fcb30c6dac231210c6e8534b18 (diff)
downloadgeiser-guile-c4287cdbb796507575a71a2bfc589f0f107f436f.tar.gz
geiser-guile-c4287cdbb796507575a71a2bfc589f0f107f436f.tar.bz2
Debugger support, and Guile using it
Diffstat (limited to 'elisp/geiser-connection.el')
-rw-r--r--elisp/geiser-connection.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 324532b..76ba24a 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -73,11 +73,14 @@
(defun geiser-con--combined-prompt (prompt debug)
(format "\\(%s%s\\)" prompt (if debug (format "\\|%s" debug) "")))
+(defun geiser-con--connection-eot-re (prompt debug)
+ (geiser-con--combined-prompt (format "\0\n%s" prompt)
+ (and debug (format "\n%s" debug))))
+
(defun geiser-con--make-connection (proc prompt debug-prompt)
(list :geiser-connection
(cons :tq (tq-create proc))
- (cons :eot (format "\0\n%s"
- (geiser-con--combined-prompt prompt debug-prompt)))
+ (cons :eot (geiser-con--connection-eot-re prompt debug-prompt))
(cons :prompt prompt)
(cons :debug-prompt debug-prompt)
(cons :count 0)
@@ -86,14 +89,13 @@
(defun geiser-con--connection-swap-proc (con proc)
(let* ((this-proc (geiser-con--connection-process con))
(this-filter (process-filter this-proc))
- (this-buffer (process-buffer this-proc))
(filter (process-filter proc))
(buffer (process-buffer proc))
(tq (geiser-con--connection-tq con)))
(set-process-filter this-proc filter)
(set-process-buffer this-proc buffer)
(set-process-filter proc this-filter)
- (set-process-buffer proc this-buffer)
+ (set-process-buffer proc nil)
(setcdr tq (cons proc (tq-buffer tq)))
this-proc))
@@ -187,8 +189,11 @@
(geiser-con--connection-completed con req)))
(defun geiser-con--connection-add-request (c r)
+ (geiser-log--info "REQUEST: <%s>: %s"
+ (geiser-con--request-id r)
+ (geiser-con--request-string r))
(tq-enqueue (geiser-con--connection-tq c)
- (geiser-con--request-string r)
+ (concat (geiser-con--request-string r) "\n")
(geiser-con--connection-eot c)
r
'geiser-con--process-completed-request