diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-02-03 22:33:45 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-02-03 22:33:45 +0100 |
commit | 1536e3bf322ad27f6f4a4f961efbd8510148a5d6 (patch) | |
tree | a2e8e50295b430549c55c2b7607084657728b438 /scheme/guile/geiser/evaluation.scm | |
parent | 1eb968ccfdf86ae6d206540f84856d56e2045277 (diff) | |
download | geiser-guile-1536e3bf322ad27f6f4a4f961efbd8510148a5d6.tar.gz geiser-guile-1536e3bf322ad27f6f4a4f961efbd8510148a5d6.tar.bz2 |
New geiser-add-to-load-path, just for Guile right now
As per Andy's request. Adding it to Racket (and to the user manual),
shouldn't be difficult).
Diffstat (limited to 'scheme/guile/geiser/evaluation.scm')
-rw-r--r-- | scheme/guile/geiser/evaluation.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm index 3741c6a..b6575ba 100644 --- a/scheme/guile/geiser/evaluation.scm +++ b/scheme/guile/geiser/evaluation.scm @@ -1,6 +1,6 @@ ;;; evaluation.scm -- evaluation, compilation and macro-expansion -;; 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 @@ -15,7 +15,8 @@ ge:macroexpand ge:compile-file ge:load-file - ge:set-warnings) + ge:set-warnings + ge:add-to-load-path) #:use-module (geiser modules) #:use-module (srfi srfi-1) #:use-module (language tree-il) @@ -104,3 +105,9 @@ (with-output-to-string (lambda () (pretty-print (tree-il->scheme (macroexpand form))))))) + +(define (ge:add-to-load-path dir) + (and (file-is-directory? dir) + (not (member dir %load-path)) + (begin (set! %load-path (cons dir %load-path)) + #t))) |