From 903765f0d9fee0412e63d960f20b741c5afbcea7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 27 Nov 2019 14:02:42 +0900
Subject: gnu: emacs: Use load-path instead of EMACSLOADPATH.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>
---
 gnu/packages/aux-files/emacs/guix-emacs.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'gnu/packages/aux-files')

diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el
index b4315c1a2e..05fc9709b6 100644
--- a/gnu/packages/aux-files/emacs/guix-emacs.el
+++ b/gnu/packages/aux-files/emacs/guix-emacs.el
@@ -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)
-- 
cgit v1.2.3