emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Extra information in autoload error


From: Alex
Subject: Re: [PATCH] Extra information in autoload error
Date: Wed, 21 Sep 2016 16:16:27 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Davis Herring <address@hidden> writes:

>> +    error ("Autoloading failed to define function %s in file %s",
>
> I'd phrase it as "Autoloading file %s failed to define function %s". (It's a 
> bit
> odd to say the function is in the file when we've just learned it isn't.)
>
> Davis

Thanks, I agree that it's better. I suppose I wanted to append rather
than rewrite the message, but there's really no reason to hold back.

The updated patches follow:

diff --git a/src/eval.c b/src/eval.c
index e08a25a..4daf052 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1987,7 +1987,8 @@ it defines a macro.  */)
       Lisp_Object fun = Findirect_function (funname, Qnil);
 
       if (!NILP (Fequal (fun, fundef)))
-       error ("Autoloading failed to define function %s",
+       error ("Autoloading file %s failed to define function %s",
+              SDATA (Fcar (Fcar (Vload_history))),
               SDATA (SYMBOL_NAME (funname)));
       else
        return fun;
diff --git a/src/eval.c b/src/eval.c
index e08a25a..8c5c5e5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1987,7 +1987,8 @@ it defines a macro.  */)
       Lisp_Object fun = Findirect_function (funname, Qnil);
 
       if (!NILP (Fequal (fun, fundef)))
-       error ("Autoloading failed to define function %s",
+       error ("Autoloading filename %s failed to define function %s",
+              SDATA (Fcar (Fcdr (fundef))),
               SDATA (SYMBOL_NAME (funname)));
       else
        return fun;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]