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
commitb4e68d4cad62cc8ac093dd2f7c07671c7b9ee3db (patch)
tree080b8c4e5ac08ca2dd292015cb6a2dcfbe1f188c /elisp/geiser-larceny.el
parent8368aced1d2ef98c79fb76e9cf58dc320ef89342 (diff)
downloadgeiser-b4e68d4cad62cc8ac093dd2f7c07671c7b9ee3db.tar.gz
geiser-b4e68d4cad62cc8ac093dd2f7c07671c7b9ee3db.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: