X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fmodule.lisp;h=a6b47b487ed85b49efd9597230db6c4c3fcbd316;hb=cee8ef591040db9a79cdd19297867672a9529051;hp=369dcb2e1256251e11949dc83d323b3e9fe04b5e;hpb=c6721c2ec4145261b74cef7fba96b303a277e931;p=sbcl.git diff --git a/src/code/module.lisp b/src/code/module.lisp index 369dcb2..a6b47b4 100644 --- a/src/code/module.lisp +++ b/src/code/module.lisp @@ -83,9 +83,10 @@ (let* ((filesys-name (string-downcase (string name))) (unadorned-path (merge-pathnames - (make-pathname :directory (list :relative filesys-name) + (make-pathname :directory (list :relative "contrib") :name filesys-name) - (truename (posix-getenv "SBCL_HOME")))) + (truename (or (sbcl-homedir-pathname) + (return-from module-provide-contrib nil))))) (fasl-path (merge-pathnames (make-pathname :type *fasl-file-type*) unadorned-path)) @@ -95,8 +96,11 @@ ;; be removed by the time we get round to trying to load it. ;; Maybe factor out the logic in the LOAD guesser as to which file ;; was meant, so that we can use it here on open streams instead? - (when (or (probe-file unadorned-path) - (probe-file fasl-path) - (probe-file lisp-path)) - (load unadorned-path) - t))) + (let ((file (or (probe-file fasl-path) + (probe-file unadorned-path) + (probe-file lisp-path)))) + (when file + (handler-bind + (((or style-warning sb!int:package-at-variance) #'muffle-warning)) + (load file)) + t))))