[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: |
Sat, 22 Oct 2016 10:23:06 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Alex <address@hidden> writes:
> 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;
Ping. Does anyone have an opinion on which of the two diffs is better?
- Re: [PATCH] Extra information in autoload error,
Alex <=
- Re: [PATCH] Extra information in autoload error, Eli Zaretskii, 2016/10/22
- Re: [PATCH] Extra information in autoload error, Stefan Monnier, 2016/10/22
- Re: [PATCH] Extra information in autoload error, Alex, 2016/10/22
- Re: [PATCH] Extra information in autoload error, Eli Zaretskii, 2016/10/23
- Re: [PATCH] Extra information in autoload error, Alex, 2016/10/23
- Re: [PATCH] Extra information in autoload error, Eli Zaretskii, 2016/10/24
- Re: [PATCH] Extra information in autoload error, Alex, 2016/10/24
- Re: [PATCH] Extra information in autoload error, Eli Zaretskii, 2016/10/24
- Re: [PATCH] Extra information in autoload error, Alex, 2016/10/25