summaryrefslogtreecommitdiff
path: root/elisp/geiser-racket.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-racket.el')
-rw-r--r--elisp/geiser-racket.el37
1 files changed, 25 insertions, 12 deletions
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index 52f7a32..0cb4663 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -63,6 +63,12 @@ This executable is used by `run-gracket', and, if
:type '(repeat string)
:group 'geiser-racket)
+(geiser-custom--defcustom geiser-racket-image-cache-directory nil
+ "The directory where temporary image files generated by Racket are stored.
+If set to nil, the default system temp dir is used."
+ :type 'file
+ :group 'geiser-racket)
+
;;; REPL support:
@@ -92,6 +98,24 @@ This function uses `geiser-racket-init-file' if it exists."
(defconst geiser-racket--prompt-regexp "\\(mzscheme\\|racket\\)@[^ ]*?> ")
+(defun geiser-racket--startup (remote)
+ (when geiser-racket-image-cache-directory
+ (geiser-eval--send/wait
+ (format ",set-image-cache %S\n'done"
+ geiser-racket-image-cache-directory))))
+
+
+;;; Remote REPLs
+
+(defun connect-to-racket ()
+ "Start a Racket REPL connected to a remote process.
+
+The remote process needs to be running a REPL server started
+using start-geiser, a procedure in the geiser/server module."
+ (interactive)
+ (geiser-connect 'racket))
+
+
;;; Evaluation support:
@@ -281,24 +305,13 @@ This function uses `geiser-racket-init-file' if it exists."
-;;; Remote REPLs
-
-(defun connect-to-racket ()
- "Start a Racket REPL connected to a remote process.
-
-The remote process needs to be running a REPL server started
-using start-geiser, a procedure in the geiser/server module."
- (interactive)
- (geiser-connect 'racket))
-
-
-
;;; Implementation definition:
(define-geiser-implementation racket
(unsupported-procedures '(callers callees generic-methods))
(binary geiser-racket--binary)
(arglist geiser-racket--parameters)
+ (repl-startup geiser-racket--startup)
(prompt-regexp geiser-racket--prompt-regexp)
(marshall-procedure geiser-racket--geiser-procedure)
(find-module geiser-racket--get-module)