mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +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:
parent
ffd3e55cfd
commit
8857e271d8
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue