gnu: emacs: Adapt the autoloads auxiliary code to use EMACSLOADPATH.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 30 Oct 2019 02:07:55 +0000 (22:07 -0400)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Mon, 18 Nov 2019 05:34:41 +0000 (14:34 +0900)
commit47b3b4c2aa49e21f4cc32c97ff7bbbd069bb849c
tree9f07c4f3b0e72e260af5c1322f5aa238b550bcf0
parente1d31e6457481b471073e395136e7538e6692c97
gnu: emacs: Adapt the autoloads auxiliary code to use EMACSLOADPATH.

The Elisp directories to scan for autoloads are now taken from EMACSLOADPATH
instead of from the user profile, environment profile or system profile.
Manually adding the Elisp directories to the `load-path' is no longer
necessary, as this is covered by Emacs when they are in EMACSLOADPATH.  The
caching logic is also removed, as this code is not typically run often and the
gain is marginal (loading autoloads files is cheap).

* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-directory)
(guix-emacs-subdirs, guix-emacs-directories): Remove procedures.
(guix-emacs-find-autoloads): Filter the directory entries by passing the
regexp to `directory-files' directly, which is ten times faster.  Remove
deduplication.
(guix-emacs-autoloads-regexp): Remove the group, which used to filter out the
file extension; it no longer works this way due to passing the regexp to the
`directory-files' procedure directly, which doesn't care about groups.
(guix-emacs-autoload-packages): Update doc.  Search package directories from
EMACSLOADPATH.  Do not populate the load-path.  Remove cache.
gnu/packages/aux-files/emacs/guix-emacs.el