summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-08-25 06:10:05 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-08-25 06:20:33 +0200
commit6c5ceb7ce8f194a7d0e542a3bae268e0506fdd71 (patch)
treec08e36082a65978f268aa33f5203d16b9aae2847 /scheme
parent9b31ffba524337003c00a62997a27a62a270100e (diff)
downloadgeiser-chez-6c5ceb7ce8f194a7d0e542a3bae268e0506fdd71.tar.gz
geiser-chez-6c5ceb7ce8f194a7d0e542a3bae268e0506fdd71.tar.bz2
racket: reading into elisp-land the cache dir as needed
When no cache dir is set in the emacs customization, we ask Racket for the one that it's using by default.
Diffstat (limited to 'scheme')
-rw-r--r--scheme/racket/geiser/user.rkt8
1 files changed, 5 insertions, 3 deletions
diff --git a/scheme/racket/geiser/user.rkt b/scheme/racket/geiser/user.rkt
index 5d3ab32..2eb0cb5 100644
--- a/scheme/racket/geiser/user.rkt
+++ b/scheme/racket/geiser/user.rkt
@@ -93,9 +93,11 @@
(define image-cache
(let ([ensure-dir (lambda (dir)
- (and (path-string? dir)
- (begin (make-directory* dir) dir)))])
- (make-parameter #f ensure-dir)))
+ (if (path-string? dir)
+ (begin (make-directory* dir)
+ (if (path? dir) (path->string dir) dir))
+ (path->string (find-system-path 'temp-dir))))])
+ (make-parameter (ensure-dir #f) ensure-dir)))
(define (geiser-prompt-read prompt)
(make-repl-reader (geiser-read prompt)))