diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-13 20:36:56 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-13 20:36:56 +0200 |
commit | 9d0d38a20850f3f9eecd74267970748bbcbc6bdc (patch) | |
tree | 3298a3c4f2976c39864deb23a4341aabde6930fd /geiser | |
parent | 6c9efbc61592aa24429d5c29b641b7f1ff1eff51 (diff) | |
download | geiser-guile-9d0d38a20850f3f9eecd74267970748bbcbc6bdc.tar.gz geiser-guile-9d0d38a20850f3f9eecd74267970748bbcbc6bdc.tar.bz2 |
Guile: augmenting %load-compiled-path too
We add the paths in geiser-guile-load-path also to %load-compiled-path,
and new directories added to the load path via geiser-add-to-load-path
are added to both %load-path and %load-compiled-path.
Here's hope Ludovic will like all these additions!
Diffstat (limited to 'geiser')
-rw-r--r-- | geiser/evaluation.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm index 5562382..21f8772 100644 --- a/geiser/evaluation.scm +++ b/geiser/evaluation.scm @@ -1,6 +1,6 @@ ;;; evaluation.scm -- evaluation, compilation and macro-expansion -;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2013 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 @@ -108,8 +108,15 @@ (lambda () (pretty-print (tree-il->scheme (macroexpand form))))))) +(define (add-to-list lst dir) + (and (not (member dir lst)))) + (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))) + (let ((in-lp (member dir %load-path)) + (in-clp (member dir %load-compiled-path))) + (when (not in-lp) + (set! %load-path (cons dir %load-path))) + (when (not in-clp) + (set! %load-compiled-path (cons dir %load-compiled-path))) + (or in-lp in-clp)))) |