summary refs log tree commit diff
path: root/gnu/packages/emacs.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2021-05-22 14:54:28 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2021-12-03 21:39:50 +0100
commit15404ff19b304bc9efcdb9a326318fb9fa9716da (patch)
tree04a8cbd2eedb4522e9d1072027908779c8d9ae72 /gnu/packages/emacs.scm
parent98cec369571a6c5a4849f97605b41c37503f4a07 (diff)
downloadguix-15404ff19b304bc9efcdb9a326318fb9fa9716da.tar.gz
gnu: emacs: Load package descriptors from packages referenced by subdirs.el
* gnu/packages/aux-files/emacs/guix-emacs.el
(guix-emacs--non-core-load-path): New procedure.
(guix-emacs-autoload-packages): Use it here.
(guix-emacs-load-package-descriptors): New procedure.
* gnu/packages/emacs.scm (emacs)[install-site-start]: Install advice to run
‘guix-emacs-load-package-descriptors’.
Diffstat (limited to 'gnu/packages/emacs.scm')
-rw-r--r--gnu/packages/emacs.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f534b1ccdc..03f8c25d67 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -185,8 +185,11 @@
                (with-output-to-file (string-append lisp-dir "/site-start.el")
                  (lambda ()
                    (display
-                    (string-append "(when (require 'guix-emacs nil t)\n"
-                                   "  (guix-emacs-autoload-packages))\n"))))
+                    (string-append
+                     "(when (require 'guix-emacs nil t)\n"
+                     "  (guix-emacs-autoload-packages)\n"
+                     "  (advice-add 'package-load-all-descriptors"
+                     " :after #'guix-emacs-load-package-descriptors))"))))
                ;; Remove the extraneous subdirs.el file, as it causes Emacs to
                ;; add recursively all the the sub-directories of a profile's
                ;; share/emacs/site-lisp union when added to EMACSLOADPATH,