[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 58326f0: More informative error when required featu
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 58326f0: More informative error when required feature missing |
Date: |
Tue, 9 May 2017 19:47:20 -0400 (EDT) |
branch: master
commit 58326f0f117b229b690023d3851a00d876a7aca6
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
More informative error when required feature missing
* src/fns.c (Frequire): Include file name in missing feature error.
* doc/lispref/loading.texi (Named Features): Don't quote actual error.
---
doc/lispref/loading.texi | 3 +--
src/fns.c | 13 +++++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 1199cfa..d925c8c 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -900,8 +900,7 @@ if loading the file fails. Normally, @code{require} returns
@var{feature}.
If loading the file succeeds but does not provide @var{feature},
address@hidden signals an error, @samp{Required feature @var{feature}
-was not provided}.
address@hidden signals an error about the missing feature.
@end defun
@defun featurep feature &optional subfeature
diff --git a/src/fns.c b/src/fns.c
index 10d35b6..0332ab5 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2797,8 +2797,17 @@ suppressed. */)
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 58326f0: More informative error when required feature missing,
Glenn Morris <=