gnu: emacs: Use load-path instead of EMACSLOADPATH.

This enables the use of the subdirs.el feature of Emacs, where specifying a
directory in EMACSLOADPATH translates into a `load-path' variable containing
the directory and all its sub-directories.

* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages):
Use `load-path' directly instead of parsing EMACSLOADPATH.

Reported-by: Leo Prikler <leo.prikler@student.tugraz.at>
Signed-off-by: Clément Lassieur <clement@lassieur.org>
This commit is contained in:
Maxim Cournoyer 2019-11-27 14:02:42 +09:00 committed by Clément Lassieur
parent c320acd633
commit 903765f0d9
No known key found for this signature in database
GPG key ID: 89F96D4808F359C7

View file

@ -47,13 +47,12 @@ The files in the list do not have extensions (.el, .elc)."
;; FIXME: The autoloads generated by the emacs-build-system are not byte
;; compiled.
(interactive)
(let* ((emacs-load-path (getenv "EMACSLOADPATH"))
(emacs-non-core-load-path-directories
(let* ((emacs-non-core-load-path-directories
;; Filter out core Elisp directories, which are already autoloaded
;; by Emacs.
(seq-filter (lambda (dir)
(string-match-p "/share/emacs/site-lisp" dir))
(split-string emacs-load-path ":")))
load-path))
(autoloads (mapcan #'guix-emacs-find-autoloads
emacs-non-core-load-path-directories)))
(mapc (lambda (f)