diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-07 05:16:20 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-07 05:16:20 +0100 |
commit | 1e87980a965528177fef3cf97298f44ef02cbfc0 (patch) | |
tree | be8c10c81e64165127c7495d1cb11f0e7831cc9d /elisp/geiser-repl.el | |
parent | c60416ef24f5d97feba85674198932ffda5fdba5 (diff) | |
download | geiser-guile-1e87980a965528177fef3cf97298f44ef02cbfc0.tar.gz geiser-guile-1e87980a965528177fef3cf97298f44ef02cbfc0.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.el | 14 |
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) |