summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-08-14 21:48:10 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-08-14 21:48:10 +0200
commit203b248cd24a86934fb61183d44b16ceb82eef3b (patch)
treefa990ab0521d84241baca24d2d3afb6708058bd8 /elisp
parent468f82fcb4a77f3386f1ae1744314a2007bf22df (diff)
downloadgeiser-203b248cd24a86934fb61183d44b16ceb82eef3b.tar.gz
geiser-203b248cd24a86934fb61183d44b16ceb82eef3b.tar.bz2
New restart repl command and a bit more docs.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-mode.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 083d90a..d786b1b 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -164,6 +164,18 @@ With prefix, try to enter the current's buffer module."
(interactive)
(geiser-mode-switch-to-repl t))
+(defun geiser-restart-repl ()
+ "Restarts the REPL associated with the current buffer."
+ (interactive)
+ (let ((b (current-buffer)))
+ (geiser-mode-switch-to-repl nil)
+ (comint-kill-subjob)
+ (sit-for 0.1) ;; ugly hack; but i don't care enough to fix it
+ (call-interactively 'run-geiser)
+ (sit-for 0.2) ;; ditto
+ (end-of-buffer)
+ (pop-to-buffer b)))
+
;;; Geiser mode: