diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-08-20 06:15:04 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-08-20 06:15:04 +0200 |
commit | 9b31ffba524337003c00a62997a27a62a270100e (patch) | |
tree | 592513ebd9900ba995cec3a5ee44d18db9fa7584 /elisp | |
parent | 040f2c628c09efd64a100e47fe134d6f7a65caf2 (diff) | |
download | geiser-guile-9b31ffba524337003c00a62997a27a62a270100e.tar.gz geiser-guile-9b31ffba524337003c00a62997a27a62a270100e.tar.bz2 |
Racket: configurable image cache directory
Brought to you by a comma-command in the REPL and the REPL startup
function.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-racket.el | 37 |
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) |