summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 05:16:20 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-07 05:16:20 +0100
commita7d5b74b8fcda5952da0557bcd5d3cbb45fc6403 (patch)
tree48bfa6f97f9ba4543886fb3d27d600d95ab3a2e7 /elisp/geiser-repl.el
parent6301342e046ccca8a981c072b1968496b0e9e43a (diff)
downloadgeiser-a7d5b74b8fcda5952da0557bcd5d3cbb45fc6403.tar.gz
geiser-a7d5b74b8fcda5952da0557bcd5d3cbb45fc6403.tar.bz2
New command to switch to REPL and put it in current module.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 2afdcef..facae50 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -227,6 +227,20 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
(defalias 'geiser 'switch-to-geiser)
+(geiser-impl--define-caller geiser-repl--enter-cmd enter-command (module)
+ "Function taking a module designator and returning a REPL enter
+module command as a string")
+
+(defun switch-to-geiser-module ()
+ "Switch to running Geiser REPL and try to enter current module."
+ (interactive)
+ (let ((m (geiser-repl--enter-cmd geiser-impl--implementation
+ (geiser-eval--get-module))))
+ (switch-to-geiser)
+ (when m
+ (comint-send-string nil m)
+ (comint-send-eof))))
+
(defun geiser-repl-nuke ()
"Try this command if the REPL becomes unresponsive."
(interactive)