diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6258dbaed..d290a61b4 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -7733,7 +7733,8 @@ object has been freed.") ,@%gnu-build-system-modules (guix build emacs-utils)) #:imported-modules (,@%gnu-build-system-modules - (guix build emacs-utils)) + (guix build emacs-utils) + (guix build emacs-build-system)) #:phases (modify-phases %standard-phases (delete 'configure) @@ -7744,22 +7745,8 @@ object has been freed.") #t)) (add-after 'patch-elisp-shell-shebangs 'setenv-emacsloadpath (lambda* (#:key inputs #:allow-other-keys) - (define (el-dir store-dir) - (match (find-files store-dir "\\.el$") - ((f1 f2 ...) (dirname f1)) - (_ ""))) - (define emacs-prefix? (cut string-prefix? "emacs-" <>)) - (let* ((emacs-load-paths - (map (match-lambda - (((? emacs-prefix? name) . dir) - (string-append (el-dir dir) ":")) - (_ "")) - inputs)) - (emacs-load-path-value - (string-concatenate emacs-load-paths))) - (format #t "environment variable `EMACSLOADPATH' set to ~a\n" - emacs-load-path-value) - (setenv "EMACSLOADPATH" emacs-load-path-value)) + ((@@ (guix build emacs-build-system) set-emacs-load-path) + inputs) #t)) (add-after 'setenv-emacsloadpath 'setenv-shell (lambda _