bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16573: 24.3; Auctex (11.87.2) in Elpa issues hundreds of warnings on


From: Stefan Monnier
Subject: bug#16573: 24.3; Auctex (11.87.2) in Elpa issues hundreds of warnings on compile
Date: Tue, 28 Jan 2014 20:26:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> That's certainly not recommended for everyone and everything, but since
> declare-function must used in situations were the function to be
> declared is known to be already defined at runtime, the autoload will
> never do anything anyway;

It does do something:
- it does something during byte-compilation.
- it does something during run-time if the function is "already loaded
  when you call it" but not "already loaded when you load the file".
Both of those situations are quite common.  The reason why you don't
suffer from it is not that the autoload doesn't do anything, but because
the autoload is usually harmless.

> Defining this nil and then not finding the one warning that must be
> dealt with in the hundreds of spurious warnings is decidedly worse.

Admittedly I haven't spent much time dealing with compatibility with
older Emacsen lately, but in the past I've never found warnings useful
for that work.  So I only ever used warnings to help debug & improve my
code on my "main" Emacs version, and completely ignored warnings when
porting to older Emacsen (relying on testing and bug-reports instead).

Of course, it's probably got to do with taste, but if you're going to
use `autoload', then I strongly suggest you name it
`<foo>-declare-function', since when "adding a missing definition" you're
better off defining it *exactly* like a recentish Emacs.


        Stefan





reply via email to

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