diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-03-06 03:18:43 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-03-06 03:18:43 +0100 |
commit | 98374c61cc6de60f2fa2912ee9b5e3d199477ab7 (patch) | |
tree | bc7f703e0b3b976aa78ab5767116a73128adb4bb /scheme/racket/geiser/eval.rkt | |
parent | 0e8be474273d6a515622334a16f2b0d34024e934 (diff) | |
download | geiser-guile-98374c61cc6de60f2fa2912ee9b5e3d199477ab7.tar.gz geiser-guile-98374c61cc6de60f2fa2912ee9b5e3d199477ab7.tar.bz2 |
Racket: geiser-add-to-load-path implemented
And we take the chance to lightly document the existence of this
new command in the user manual.
Diffstat (limited to 'scheme/racket/geiser/eval.rkt')
-rw-r--r-- | scheme/racket/geiser/eval.rkt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scheme/racket/geiser/eval.rkt b/scheme/racket/geiser/eval.rkt index f1f3f51..a59e275 100644 --- a/scheme/racket/geiser/eval.rkt +++ b/scheme/racket/geiser/eval.rkt @@ -1,6 +1,6 @@ ;;; eval.rkt -- evaluation -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011 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 @@ -14,6 +14,7 @@ (provide eval-in load-file macroexpand + add-to-load-path make-repl-reader) @@ -65,6 +66,15 @@ (lambda () (pretty-print (syntax->datum ((if all expand expand-once) form))))))) +(define (add-to-load-path p) + (when (string? p) + (let ([p (string->path p)] + [cps (current-library-collection-paths)]) + (unless (member p cps) + (current-library-collection-paths + (cons p cps))))) + #t) + (define (make-repl-reader reader) (lambda () (last-namespace (current-namespace)) |