all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Extra information in autoload error
Date: Sat, 22 Oct 2016 19:30:43 +0300	[thread overview]
Message-ID: <83pomspcr0.fsf@gnu.org> (raw)
In-Reply-To: <87a8dw8iad.fsf@gmail.com> (message from Alex on Sat, 22 Oct 2016 10:23:06 -0600)

> From: Alex <agrambot@gmail.com>
> Date: Sat, 22 Oct 2016 10:23:06 -0600
> Cc: emacs-devel@gnu.org
> 
> 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?

The second one, IMO.



  reply	other threads:[~2016-10-22 16:30 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
2016-10-22 16:30       ` Eli Zaretskii [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pomspcr0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=agrambot@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.