summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-27 14:44:16 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-27 14:44:16 +0200
commit9ef09ff72b8c8a015b38a30334b00cb4cea15158 (patch)
tree3473601e47905c05cb0a28dc1bcc8cd8c470debd /elisp/geiser-guile.el
parenteab369930516ece1d40658b891f4629d6f9ed8ac (diff)
downloadgeiser-chez-9ef09ff72b8c8a015b38a30334b00cb4cea15158.tar.gz
geiser-chez-9ef09ff72b8c8a015b38a30334b00cb4cea15158.tar.bz2
Better switch/import REPL commands.
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index cfcba80..fb49085 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -90,8 +90,18 @@ This function uses `geiser-guile-init-file' if it exists."
(car (geiser-syntax--read-from-string module))) :f))
(t :f)))
+(defun geiser-guile--module-cmd (module fmt &optional def)
+ (when module
+ (let* ((module (geiser-guile--get-module module))
+ (module (cond ((or (null module) (eq module :f)) def)
+ (t (format "%s" module)))))
+ (and module (format fmt module)))))
+
+(defun geiser-guile--import-command (module)
+ (geiser-guile--module-cmd module ",i %s"))
+
(defun geiser-guile--enter-command (module)
- (and module (format ",m %s" (geiser-guile--get-module module))))
+ (geiser-guile--module-cmd module ",m %s" "(guile-user)"))
(defun geiser-guile--symbol-begin (module)
(if module
@@ -204,6 +214,7 @@ This function uses `geiser-guile-init-file' if it exists."
(marshall-procedure geiser-guile--geiser-procedure)
(find-module geiser-guile--get-module)
(enter-command geiser-guile--enter-command)
+ (import-command geiser-guile--import-command)
(find-symbol-begin geiser-guile--symbol-begin)
(display-error geiser-guile--display-error)
(display-help)