GNU bug report logs - #16573
24.3; Auctex (11.87.2) in Elpa issues hundreds of warnings on compile

Previous Next

Packages: auctex, emacs;

Reported by: Neil Jackson <neil.jackson <at> live.ca>

Date: Mon, 27 Jan 2014 18:17:03 UTC

Severity: wishlist

Found in version 24.3

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #98 received at 16573 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, David Kastrup <dak <at> gnu.org>,
 Neil Jackson <neil.jackson <at> live.ca>, 16573 <at> debbugs.gnu.org
Subject: Re: bug#16573: 24.3;
 Auctex (11.87.2) in Elpa issues hundreds of warnings on compile
Date: Fri, 31 Jan 2014 09:49:50 -0500
>>> I guess I should wrap those TeX-auto-add-type calls with a
>>> `eval-when-compile', right?
>> You could.
> No, I get a compile error in tex.el when compiling

Of course, eval-when-compile and eval-and-compile come with their own
set of problems.  My "you could" wasn't really meant as an encouragement.

>> Or you could turn them into macros.
> Indeed, that looks like a typical use-case for macros, but I'm rather
> sure that there's a good reason that the auto parser stuff is like it
> is.  David?

Whatever the reason, looking at the code of TeX-auto-add-type, I think
it *really* should be turned into a macro, and use defvar/defalias
instead of set/fset.

> While we are at it: David, is there any reason why somebody would want
> to set TeX-install-font-lock to 'ignore nowadays so that font-latex is
> not loaded?

Would that make AUCTeX use tex-mode.el's font-lock rules?

>> Good question.  We usually use `declare-function' for these, but
>> admittedly, it's not a great solution.
> I see.  The reason for the code above is that foo is only callable in
> very special conditions.

That's what I expected.  We also have such code in various parts
of Emacs.  But we don't have a really good solution w.r.t to silencing
those warnings.

One potential solution I haven't investigated is to create a new
`require-autoload' which behaves somewhat like `require' (when
interpreted) but which the compiler would replace by a bunch of
autoloads (auto-generated by the compiler by taking the intersection of
the functions provided by the `require' and the functions called in the
file).  So you'd replace that code with

   (require-autoload 'url-util)
   (defun foo ()
     (url-util-* ...))

and url-util would only be loaded once you call `foo'.
Maybe `require-lazy' would be a better name for it, but in any case as
long as it's not implemented, its name doesn't matter much.


        Stefan




This bug report was last modified 3 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.