summaryrefslogtreecommitdiff
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
commita8b44d6042c9ccbaaefb810bbcc683582b386561 (patch)
tree648a93f5e5d994723517eebe6e3c94358d13e50c
parent423fc100e0e4520710c10654afde5c627e489750 (diff)
downloadgeiser-a8b44d6042c9ccbaaefb810bbcc683582b386561.tar.gz
geiser-a8b44d6042c9ccbaaefb810bbcc683582b386561.tar.bz2
Better prompt behaviour in switch to REPL and module.
-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."