l...@gnu.org (Ludovic Courtès) writes:

> Alex Kost <alez...@gmail.com> skribis:
>
>> Ludovic Courtès (2014-11-27 01:41 +0300) wrote:
>
> [...]
>
>>>> The problem is that I don't understand what these %standard-emacs-phases
>>>> should be,
>>>
>>> (define %standard-emacs-phases
>>>   (alist-cons-after
>>>    'install 'post-install
>>>    (lambda* (#:key outputs #:allow-other-keys)
>>>      (install-autoloads (assoc-ref outputs "out")))
>>>    %standard-phases))
>>
>> Sorry, I didn't get how it would work.  I realized that I don't
>> understand how there could be a generalized ‘install-autoloads’
>> procedure as it should do different things for different packages.
>

AFAIU the initialization of each package is already defined inside each
package by the author. The way emacs's packaging infrastructure works
goes along the lines (see (elisp) Packaging Basics):

* At installation:

  - Search every Lisp file in the content directory for autoload magic
    comments (*note Autoload::).  These autoload definitions are saved
    to a file named `NAME-autoloads.el' in the package's content
    directory.

  - Byte-compiles every Lisp file in the package.

  - Add the package's content directory to `load-path', and evaluates
    the autoload definitions in `NAME-autoloads.el'.

* At startup:

  - Emacs scans for a predefined directory for NAME-autoloads.el files
    and evaluates them ('package-initialize' function). We could maybe
    exploit 'after-init-hook' or something something similar.

Regards,
Fede

Reply via email to