GNU bug report logs -
#26837
Wrong file in "autoloading failed to define" error
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Mon, 8 May 2017 19:15:02 UTC
Severity: minor
Found in version 26.0.50
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 26837 <at> debbugs.gnu.org (full text, mbox):
Alex wrote:
> That seems to work for me as well. Should it be documented that
> reevaluations of a file update the position of the file in load-history?
I think it's mentioned in the doc of load:
Loading a file records its definitions, and its `provide' and
`require' calls, in an element of `load-history' whose
car is the file name loaded. See `load-history'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
but that did seem to be the only mention I found in a quick search.
> PS: I realized that I was a bit careless in using SDATA without checking
> that the argument is necessarily a string. I don't think it matters much
> if your above patch is applied, but it's probably not a good idea to
> leave it in, just in case there's a bug somewhere else in the future.
In 58326f0 I check if the car is nil (though I don't see how it could be).
Could add the same thing to eval.c.
> What do you think about the following diff? This removes the dependency
> on load-history altogether:
>
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -2021,7 +2021,10 @@ it defines a macro. */)
>
> if (!NILP (Fequal (fun, fundef)))
> error ("Autoloading file %s failed to define function %s",
> - SDATA (Fcar (Fcar (Vload_history))),
> + SDATA (Flocate_file_internal (Fcar (Fcdr (fundef)),
> + Vload_path,
> + Vload_suffixes,
> + Qnil)),
> SDATA (SYMBOL_NAME (funname)));
> else
> return fun;
I don't have an informed opinion right now.
This bug report was last modified 8 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.