summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2011-06-23 00:32:27 +0200
committerjao <jao@gnu.org>2011-06-23 00:32:27 +0200
commit4396a8cf2d27c03589a60e14c1eb95a3ba21fff8 (patch)
treec5dff39a29720553c5f42c868c96a500dedcf764 /elisp/geiser-repl.el
parentbe04e20fb0864b09395c5bd55783033e82145148 (diff)
downloadgeiser-4396a8cf2d27c03589a60e14c1eb95a3ba21fff8.tar.gz
geiser-4396a8cf2d27c03589a60e14c1eb95a3ba21fff8.tar.bz2
Avoid (read) breakage (fixes #33090)
Autodoc was firing while the REPL was waiting for input of a (read) call, causing all kinds of misbehaviour. We now inhibit autodoc on sending a form for evaluation and re-inhibit it once a prompt is read back again.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 74a1207..5027c28 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -253,8 +253,10 @@ module command as a string")
(geiser-repl--host)
(geiser-repl--port)))))
-(defun geiser-repl--update-debugging (txt)
- (geiser-con--connection-update-debugging geiser-repl--connection txt))
+(defun geiser-repl--output-filter (txt)
+ (geiser-con--connection-update-debugging geiser-repl--connection txt)
+ (when (geiser-con--connection-eot-p geiser-repl--connection txt)
+ (geiser-autodoc--disinhibit-autodoc)))
(defun geiser-repl--start-repl (impl address)
(message "Starting Geiser REPL for %s ..." impl)
@@ -281,7 +283,7 @@ module command as a string")
(geiser-repl--autodoc-mode 1)
(geiser-company--setup geiser-repl-company-p)
(add-hook 'comint-output-filter-functions
- 'geiser-repl--update-debugging
+ 'geiser-repl--output-filter
nil
t)
(message "%s up and running!" (geiser-repl--repl-name impl))))
@@ -334,7 +336,8 @@ module command as a string")
(setq geiser-eval--default-connection-function 'geiser-repl--connection)
(defun geiser-repl--prepare-send ()
- (geiser-con--connection-deactivate geiser-repl--connection))
+ (geiser-con--connection-deactivate geiser-repl--connection)
+ (geiser-autodoc--inhibit-autodoc))
(defun geiser-repl--send (cmd)
(when (and cmd (eq major-mode 'geiser-repl-mode))