diff options
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)) |