- as an argument, until one of them returns non-NIL."
- (unless (member (string module-name) *modules* :test #'string=)
- (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))
- sb!ext::*module-provider-functions*)
- (error "Don't know how to load ~A" module-name))))))
-
+ as an argument, until one of them returns non-NIL. User code is
+ responsible for calling PROVIDE to indicate a successful load of the
+ module."
+ (let ((saved-modules (copy-list *modules*)))
+ (unless (member (string module-name) *modules* :test #'string=)
+ (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*)
+ (error 'extension-failure
+ :format-control "Don't know how to ~S ~A"
+ :format-arguments (list 'require module-name)
+ :references
+ (list
+ '(:sbcl :variable *module-provider-functions*)))))))
+ (set-difference *modules* saved-modules)))