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: Sun, 23 Oct 2016 15:24:01 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Alex <address@hidden>
>> Cc: address@hidden, Eli Zaretskii <address@hidden>
>> Date: Sat, 22 Oct 2016 14:23:34 -0600
>> 
>> (error "Autoloading failed to define function nlinum-mode2 in file
>> /home/alex/.emacs.d/elpa/nlinum-1.6/nlinum.elc")
>> 
>> I also replaced the (require 'linum) with (load "linum") and got the
>> same result.
>> 
>> So it seems to work. It seems that if there's a `require' or `load',
>> then those files get added to `load-history' before the initial file.
>> 
>> >> Ping. Does anyone have an opinion on which of the two diffs is better?
>> >
>> > I'd go with the second,
>> >
>> >
>> >         Stefan
>> 
>> Is it just because it's a "safer" option, or do you (and Eli) figure the
>> second error message would just be better?
>
> The second variant is IMO more accurate: it doesn't claim that the
> missing autoload is in the named file.  In the case above it would say
>
>   Autoloading file /home/alex/.emacs.d/elpa/nlinum-1.6/nlinum.elc
>     failed to define function nlinum-mode2
>
> which is more honest, since we don't know whether the
> problematic/missing autoload is in the named file or in some file(s)
> loaded/required by it, or some macro defined elsewhere altogether.

Sorry, I accidentally posted the older error message instead of the new
one. I was wondering if you preferred the version that used

 SDATA (Fcar (Fcar (Vload_history)))

or

 SDATA (Fcar (Fcdr (fundef)))

to get the extra information. The first one gets the file path, while
the second one just gets what was in the autoload object.



reply via email to

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