1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

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.
This commit is contained in:
Ian Price 2014-07-30 18:58:16 +01:00
parent ffd3e55cfd
commit 8857e271d8

View file

@ -1748,7 +1748,7 @@ VALUE."
(define-syntax-rule (add-to-load-path elt) (define-syntax-rule (add-to-load-path elt)
"Add ELT to Guile's load path, at compile-time and at run-time." "Add ELT to Guile's load path, at compile-time and at run-time."
(eval-when (expand load eval) (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 %load-verbosely #f)
(define (assert-load-verbosity v) (set! %load-verbosely v)) (define (assert-load-verbosity v) (set! %load-verbosely v))