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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, Neil Jackson <neil.jackson <at> live.ca>, 16573 <at> debbugs.gnu.org
Subject: bug#16573: 24.3; Auctex (11.87.2) in Elpa issues hundreds of warnings on compile
Date: Thu, 30 Jan 2014 10:41:18 -0500
> 1. Many TeX-* and LaTeX-* functions and variables are not generated
>    before tex.el and latex.el are loaded.  AUCTeX has an auto parser
[...]
>    The byte-compiler doesn't seem to execute top-level funcalls, so all
>    those functions/vars are unknown at compile-time.

Indeed, the byte-compiler compiles the code, rather than executes it.

But if it sees a (require 'foo) it will run that (require 'foo), i.e. it
will load foo.el(c), which executes all of the code in there.
So a (require 'tex) will execute (TeX-auto-add-type "symbol" "TeX") at
compile-time, and will hence cause TeX-symbol-list to exist at compile-time.

>      (TeX-auto-add-type "acronym" "LaTeX")
[...]
> I guess I should wrap those TeX-auto-add-type calls with a
> `eval-when-compile', right?

You could.  Or you could turn them into macros.

> 3. How should one deal with code like this?
>       (when (featurep 'font-latex)
>         (font-latex-add-keywords ...))

    (when (fboundp 'font-latex-add-keywords)
      (font-latex-add-keywords ...))

> 4. Or with code like this?
>
>       (defun foo ()
>         (require 'url-util)
>         (url-util-* ...))

Good question.  We usually use `declare-function' for these, but
admittedly, it's not a great solution.


        Stefan




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

Previous Next


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