summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 23:43:50 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 23:43:50 +0100
commitfd87a78cd54874a7f8260cdae11868d6ab718f09 (patch)
tree649ebfca22de8630704d667a39528b6086553c91 /elisp
parentae417f23b53c811d193fe32af23963f603545746 (diff)
downloadgeiser-chez-fd87a78cd54874a7f8260cdae11868d6ab718f09.tar.gz
geiser-chez-fd87a78cd54874a7f8260cdae11868d6ab718f09.tar.bz2
Better prompt behaviour in switch to REPL and module.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 7c0994b..9e66901 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -239,8 +239,14 @@ module command as a string")
(switch-to-geiser)
(when (and m (eq major-mode 'geiser-repl-mode))
(goto-char (point-max))
- (insert m)
- (comint-send-input))))
+ (let ((b (or (and comint-last-prompt-overlay
+ (overlay-start comint-last-prompt-overlay))
+ (point))))
+ (insert m)
+ (let ((e (point))
+ (comint-input-filter (lambda (x) nil)))
+ (comint-send-input nil t)
+ (comint-kill-region b (1+ e)))))))
(defun geiser-repl-nuke ()
"Try this command if the REPL becomes unresponsive."