@var{feature}.
If loading the file succeeds but does not provide @var{feature},
-@code{require} signals an error, @samp{Required feature @var{feature}
-was not provided}.
+@code{require} signals an error about the missing feature.
@end defun
@defun featurep feature &optional subfeature
tem = Fmemq (feature, Vfeatures);
if (NILP (tem))
- error ("Required feature `%s' was not provided",
- SDATA (SYMBOL_NAME (feature)));
+ {
+ unsigned char *tem2 = SDATA (SYMBOL_NAME (feature));
+ Lisp_Object tem3 = Fcar (Fcar (Vload_history));
+
+ if (NILP (tem3))
+ error ("Required feature `%s' was not provided", tem2);
+ else
+ /* Cf autoload-do-load. */
+ error ("Loading file %s failed to provide feature `%s'",
+ SDATA (tem3), tem2);
+ }
/* Once loading finishes, don't undo it. */
Vautoload_queue = Qt;