summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-connection.el10
-rw-r--r--elisp/geiser-repl.el5
2 files changed, 9 insertions, 6 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index c50e207..324532b 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -70,14 +70,14 @@
;;; Connection datatype:
+(defun geiser-con--combined-prompt (prompt debug)
+ (format "\\(%s%s\\)" prompt (if debug (format "\\|%s" debug) "")))
+
(defun geiser-con--make-connection (proc prompt debug-prompt)
(list :geiser-connection
(cons :tq (tq-create proc))
- (cons :eot (format "\\(%s%s\\)"
- prompt
- (if debug-prompt
- (format "\\|%s" debug-prompt)
- "")))
+ (cons :eot (format "\0\n%s"
+ (geiser-con--combined-prompt prompt debug-prompt)))
(cons :prompt prompt)
(cons :debug-prompt debug-prompt)
(cons :count 0)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 2117ff1..d99ace0 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -255,7 +255,7 @@ module command as a string")
prompt-rx
deb-prompt-rx))
(set (make-local-variable 'comint-prompt-regexp)
- (geiser-con--connection-eot geiser-repl--connection))
+ (geiser-con--combined-prompt prompt-rx deb-prompt-rx))
(apply 'make-comint-in-buffer `(,cname ,(current-buffer) ,address)))
(error (insert "Unable to start REPL:\n\n"
(error-message-string err) "\n")
@@ -284,6 +284,9 @@ module command as a string")
(let ((comint-input-filter (lambda (x) nil)))
(comint-send-input nil t))))
+(defun geiser-repl--send-silent (cmd)
+ (comint-redirect-results-list cmd ".+" 0))
+
;;; REPL history and clean-up: