From 98374c61cc6de60f2fa2912ee9b5e3d199477ab7 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 6 Mar 2011 03:18:43 +0100 Subject: 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. --- scheme/racket/geiser/eval.rkt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'scheme/racket/geiser/eval.rkt') 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)) -- cgit v1.2.3