Subject: bug#18976: 25.0.50; packages with elisp in subdirectories

From: Stefan Monnier <[email-masked]>
Date: Fri, 07 Nov 2014 14:20:44 -0500

>>> I'd like to distribute a package that has elisp in a subdirectory of its
>>> top-level directory.
Stefan> Why?
> I want to have a bunch of sub-features without mangling the names of
> every file.  Like (require 'something/sub-feature).

Hmm... clearly we could change package.el to search subdirs.  Maybe his
original author could come up with a patch (potentially by changing
update-directory-autoloads, tho such a change should be careful not to
affect existing behavior).

In the mean time, the best I can offer is to use something like

   ;;;###autoload (load "blabla" 'noerror t)
   (eval-when-compile
     (let ((generated-autoload-file "blabla"))
       (update-directory-autoloads "foo")))

in one of the top-level files.  It does have the disadvantage that these
autoloads aren't available during byte-compilation of the files.

        Stefan