From: Alex <agrambot@gmail.com>
To: Davis Herring <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Extra information in autoload error
Date: Sat, 22 Oct 2016 10:23:06 -0600 [thread overview]
Message-ID: <87a8dw8iad.fsf@gmail.com> (raw)
In-Reply-To: <87fuosoq4k.fsf@gmail.com> (Alex's message of "Wed, 21 Sep 2016 16:16:27 -0600")
Alex <agrambot@gmail.com> writes:
> Davis Herring <herring@lanl.gov> 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?
next prev parent reply other threads:[~2016-10-22 16:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 20:53 [PATCH] Extra information in autoload error Alex
2016-09-21 21:13 ` Davis Herring
2016-09-21 22:16 ` Alex
2016-10-22 16:23 ` Alex [this message]
2016-10-22 16:30 ` Eli Zaretskii
2016-10-22 19:40 ` Stefan Monnier
2016-10-22 20:23 ` Alex
2016-10-23 5:53 ` Eli Zaretskii
2016-10-23 21:24 ` Alex
2016-10-24 6:30 ` Eli Zaretskii
2016-10-24 19:21 ` Alex
2016-10-24 19:56 ` Eli Zaretskii
2016-10-25 5:47 ` Alex
2016-11-04 8:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8dw8iad.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).