GNU bug report logs - #10970
24.0.93; package.el doesn't load autoloads before compiling

Previous Next

Package: emacs;

Reported by: Donald Ephraim Curtis <dcurtis <at> milkbox.net>

Date: Thu, 8 Mar 2012 15:11:02 UTC

Severity: normal

Found in version 24.0.93

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> gnu.org>
To: Donald Ephraim Curtis <dcurtis <at> milkbox.net>
Cc: 10970 <at> debbugs.gnu.org
Subject: bug#10970: 24.0.93; package.el doesn't load autoloads before compiling
Date: Sun, 11 Mar 2012 17:26:29 +0800
Donald Ephraim Curtis <dcurtis <at> milkbox.net> writes:

> However, before compiling, the autoloads file (pkg-autoloads.el) is not
> loaded, so anything that updates the load-path is also not sourced.
>
> It may be best that packages simply put all their lisp files in the main
> package directory, but it also may be worthwhile to simply add,
>
> (load (expand-file-name (concat (symbol-name name) "-autoloads") pkg-dir) nil t)
>
> in the `package-unpack' function after the autoloads are generated.

I see the problem.  OTOH I don't see any actual bug that would arise
from loading the autoloads file before byte compilation.  But on the
other hand, it's kind of conceptually nice that the autoloads file is
only loaded when the package is activated, as a separate step from
unpacking.

Maybe it's better for the affected files to use `eval-when-compile' if
they need to alter the load path.

Anyone have another opinion?




This bug report was last modified 13 years and 135 days ago.

Previous Next


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