[Top][All Lists]

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

package.el autoload extra directories

From: Daniel Hackney
Subject: package.el autoload extra directories
Date: Wed, 23 May 2012 20:51:35 -0400

I am working to help package-ize ESS (Emacs Speaks Statistics) and one
of the problems I've run into is that ESS has its elisp files in the
"lisp" subdirectory, rather than at the root of the project. As it
stands now, package.el will not generate autoloads for the files in
subdirectories of the archive root. A simple solution is to move all of
the elisp files in ESS to the root of the distribution, but this is not
preferable for them. The source of the problem is that
`update-directory-autoloads' does not recurse into subdirectories to
find other elisp files for which to generate autoloads.

I propose one of the following:

  1. Make `update-directory-autoloads' look for a dynamic variable which
     tells it to work recursively. There could be a variable like
     `update-directory-autoloads-recursive' which, when non-nil, would
     cause `update-directory-autoloads' to dive into subdirectories.

  2. Add an option to `define-package' which lists extra elisp source
     directories for which to generate autoloads. This might look like

     (define-package "example" "1.2.3" "Example package" '()
:extra-src '("lisp"))

`update-directory-autoloads' is smart enough to figure out the
appropriate load path relative to `generated-autoload-file', so all that
would need to be done would be to add additional arguments to the call
to `update-directory-autoloads' in `package-generate-autoloads'.

I can write a proof-of-concept for package.el if people think it is
worth exploring. I'm not familiar with the autoload.el code, so it
wouldn't be as easy for me to patch that.

Daniel M. Hackney

reply via email to

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