diff options
author | Ian Price <ianprice90@googlemail.com> | 2014-07-30 18:58:16 +0100 |
---|---|---|
committer | Ian Price <ianprice90@googlemail.com> | 2014-07-30 19:22:04 +0100 |
commit | 8857e271d810623868509f837d17613195f6528c (patch) | |
tree | 9a4eab54b75186a9be5274f4d68c3b8ef97e9aa2 | |
parent | ffd3e55cfd12a3559621e3130d613d319243512d (diff) | |
download | guile-8857e271d810623868509f837d17613195f6528c.tar.gz |
Prevent add-to-load-path from adding duplicate entries
* module/ice-9/boot-9.scm (add-to-load-path): Remove argument from
%load-path (if it exists) before pushing. This also means that the
`elt' will always be at the front of %load-path.
-rw-r--r-- | module/ice-9/boot-9.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index b2cf48186..872594b20 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1748,7 +1748,7 @@ VALUE." (define-syntax-rule (add-to-load-path elt) "Add ELT to Guile's load path, at compile-time and at run-time." (eval-when (expand load eval) - (set! %load-path (cons elt %load-path)))) + (set! %load-path (cons elt (delete elt %load-path))))) (define %load-verbosely #f) (define (assert-load-verbosity v) (set! %load-verbosely v)) |