summaryrefslogtreecommitdiff
path: root/elisp/geiser-larceny.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-17 13:36:40 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-17 13:36:40 +0100
commitfe377ee5eda90a7426ff9e6dc3591c6b9e04c66d (patch)
treeeb59db169e3d5faa9c413c43889028623f1d93f3 /elisp/geiser-larceny.el
parent880d17da7bdd08da11dd3c8d55da98b1f8c34b0c (diff)
downloadgeiser-guile-fe377ee5eda90a7426ff9e6dc3591c6b9e04c66d.tar.gz
geiser-guile-fe377ee5eda90a7426ff9e6dc3591c6b9e04c66d.tar.bz2
Misc nits and work in progress.
Diffstat (limited to 'elisp/geiser-larceny.el')
-rw-r--r--elisp/geiser-larceny.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/elisp/geiser-larceny.el b/elisp/geiser-larceny.el
index f010cfb..7cc3816 100644
--- a/elisp/geiser-larceny.el
+++ b/elisp/geiser-larceny.el
@@ -24,6 +24,7 @@
;;; Code:
+(require 'geiser-eval)
(require 'geiser-impl)
(require 'geiser-syntax)
(require 'geiser-custom)
@@ -44,15 +45,27 @@
:type 'string
:group 'geiser-larceny)
+(defcustom geiser-larceny-mode 'err5rs
+ "Mode to use when starting the Larceny REPL."
+ :type '(choice (const :tag "ERR5RS" err5rs)
+ (const :tag "R5RS" 'r5rs))
+ :group 'geiser-larceny)
+
;;; REPL support:
(defun geiser-larceny-parameters ()
"Return a list with all parameters needed to start Larceny."
- `("-err5rs" "-path" ,(expand-file-name "larceny/" geiser-scheme-dir)))
+ `(,(if (eq 'r5rs geiser-larceny-mode) "-r5rs" "-err5rs")
+ "-path" ,(expand-file-name "larceny/" geiser-scheme-dir)))
(defconst geiser-larceny-prompt-regexp "^\\(debug\\)?> ")
+(defun geiser-larceny--startup ()
+ (when (eq 'err5rs geiser-larceny-mode)
+ (geiser-eval--send/wait '(import (rnrs))))
+ (geiser-eval--send/wait '(require (geiser))))
+
(defun switch-to-larceny (&optional ask)
(interactive "P")
(switch-to-geiser ask 'larceny))
@@ -92,7 +105,7 @@ If MODULE is provided, transform it to such a datum."
(defun geiser-larceny-guess ()
"Return `t' if the current buffer looks like a Larceny file."
- (and (geiser-larceny-get-module) t))
+ (listp (geiser-larceny-get-module)) t)
;;; Register this implementation: