It is used by PROVIDE and REQUIRE.")
(defvar *module-provider-functions* (list 'module-provide-contrib)
It is used by PROVIDE and REQUIRE.")
(defvar *module-provider-functions* (list 'module-provide-contrib)
- :format-control control
- :format-arguments arguments
- :references
- (list
- '(:sbcl :variable *module-provider-functions*)
- '(:sbcl :function require))))
+ :format-control control
+ :format-arguments arguments
+ :references
+ (list
+ '(:sbcl :variable *module-provider-functions*)
+ '(:sbcl :function require))))
(require-error "~@<Could not ~S ~A: circularity detected. Please check ~
your configuration.~:@>" 'require module-name))
(let ((saved-modules (copy-list *modules*))
(require-error "~@<Could not ~S ~A: circularity detected. Please check ~
your configuration.~:@>" 'require module-name))
(let ((saved-modules (copy-list *modules*))
- (cond (pathnames
- (unless (listp pathnames) (setf pathnames (list pathnames)))
- ;; ambiguity in standard: should we try all pathnames in the
- ;; list, or should we stop as soon as one of them calls PROVIDE?
- (dolist (ele pathnames t)
- (load ele)))
- (t
- (unless (some (lambda (p) (funcall p module-name))
- *module-provider-functions*)
- (require-error "Don't know how to ~S ~A."
- 'require module-name)))))
+ (cond (pathnames
+ (unless (listp pathnames) (setf pathnames (list pathnames)))
+ ;; ambiguity in standard: should we try all pathnames in the
+ ;; list, or should we stop as soon as one of them calls PROVIDE?
+ (dolist (ele pathnames t)
+ (load ele)))
+ (t
+ (unless (some (lambda (p) (funcall p module-name))
+ *module-provider-functions*)
+ (require-error "Don't know how to ~S ~A."
+ 'require module-name)))))
"Stringify and downcase NAME, then attempt to load the file
$SBCL_HOME/name/name"
(let* ((filesys-name (string-downcase (string name)))
"Stringify and downcase NAME, then attempt to load the file
$SBCL_HOME/name/name"
(let* ((filesys-name (string-downcase (string name)))
- (unadorned-path
- (merge-pathnames
- (make-pathname :directory (list :relative filesys-name)
- :name filesys-name)
- (truename (posix-getenv "SBCL_HOME"))))
- (fasl-path (merge-pathnames
- (make-pathname :type *fasl-file-type*)
- unadorned-path))
- (lisp-path (merge-pathnames (make-pathname :type "lisp")
- unadorned-path)))
+ (unadorned-path
+ (merge-pathnames
+ (make-pathname :directory (list :relative filesys-name)
+ :name filesys-name)
+ (truename (or (sbcl-homedir-pathname)
+ (return-from module-provide-contrib nil)))))
+ (fasl-path (merge-pathnames
+ (make-pathname :type *fasl-file-type*)
+ unadorned-path))
+ (lisp-path (merge-pathnames (make-pathname :type "lisp")
+ unadorned-path)))
;; KLUDGE: there's a race condition here; the file we probe could
;; 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)
;; KLUDGE: there's a race condition here; the file we probe could
;; 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)