summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-05-23 23:10:52 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-05-23 23:10:52 +0200
commita7651b6dfcad5d3eab641212751b20e1b5b7a108 (patch)
tree740631f15bfe029631218f7ebe9f317fe0b3b43e
parenteb5b639dd98c0a843c6815f16a6667cf97f0715f (diff)
downloadgeiser-a7651b6dfcad5d3eab641212751b20e1b5b7a108.tar.gz
geiser-a7651b6dfcad5d3eab641212751b20e1b5b7a108.tar.bz2
Racket support (PLT 5 needed).
-rw-r--r--elisp/geiser-plt.el17
-rw-r--r--elisp/geiser.el4
2 files changed, 14 insertions, 7 deletions
diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el
index 52af728..64b770d 100644
--- a/elisp/geiser-plt.el
+++ b/elisp/geiser-plt.el
@@ -26,9 +26,9 @@
:group 'geiser)
(geiser-custom--defcustom geiser-plt-binary
- (cond ((eq system-type 'windows-nt) "MzScheme.exe")
- ((eq system-type 'darwin) "mzscheme")
- (t "mzscheme"))
+ (cond ((eq system-type 'windows-nt) "Racket.exe")
+ ((eq system-type 'darwin) "racket")
+ (t "racket"))
"Name to use to call the mzscheme executable when starting a REPL."
:type '(choice string (repeat string))
:group 'geiser-plt)
@@ -60,9 +60,9 @@ This function uses `geiser-plt-init-file' if it exists."
,@(apply 'append (mapcar (lambda (p) (list "-S" p)) geiser-plt-collects))
,@(and (listp geiser-plt-binary) (cdr geiser-plt-binary))
,@(and init-file (file-readable-p init-file) (list "-f" init-file))
- "-f" ,(expand-file-name "plt/geiser.ss" geiser-scheme-dir))))
+ "-f" ,(expand-file-name "plt/geiser.rkt" geiser-scheme-dir))))
-(defconst geiser-plt--prompt-regexp "^=?mzscheme@[^ ]*?> ")
+(defconst geiser-plt--prompt-regexp "^=?\\(mzscheme\\|racket\\)@[^ ]*?> ")
;;; Evaluation support:
@@ -195,8 +195,13 @@ This function uses `geiser-plt-init-file' if it exists."
(binding-forms geiser-plt--binding-forms)
(binding-forms* geiser-plt--binding-forms*))
-(geiser-impl--add-to-alist 'regexp "\\.mzscheme\\.sl?s$" 'plt t)
+(geiser-impl--add-to-alist 'regexp
+ "\\.\\(mzscheme\\|racket\\)\\.sl?s$" 'plt t)
(geiser-impl--add-to-alist 'regexp "\\.ss$" 'plt t)
+(geiser-impl--add-to-alist 'regexp "\\.rkt$" 'plt t)
+
+(defalias 'run-racket 'run-plt)
+(defalias 'switch-to-racket 'switch-to-plt)
(provide 'geiser-plt)
diff --git a/elisp/geiser.el b/elisp/geiser.el
index 6263afd..4389652 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -1,6 +1,6 @@
;;; geiser.el -- main geiser file
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -82,5 +82,7 @@
(eval-after-load "scheme"
'(add-hook 'scheme-mode-hook 'turn-on-geiser-mode))
+(add-to-list 'auto-mode-alist '("\\.rkt\\'" . scheme-mode))
+
(provide 'geiser)