summaryrefslogtreecommitdiff
path: root/guix/build/emacs-build-system.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-12-31 11:04:51 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-12-31 11:04:51 +0100
commitce9383c090fff90acb3a555d0ccfe12d791fef17 (patch)
tree7b9cce156799486b94e4f3e55b03831638e73465 /guix/build/emacs-build-system.scm
parent91be09de61c277d0f1b26cefcefcd0a7fae2e00d (diff)
parentfc4eb87dc45b169e3912c73bbf60cb8ce76b7c7c (diff)
downloadguix-patches-ce9383c090fff90acb3a555d0ccfe12d791fef17.tar
guix-patches-ce9383c090fff90acb3a555d0ccfe12d791fef17.tar.gz
Merge remote-tracking branch 'master' into core-updates.
Diffstat (limited to 'guix/build/emacs-build-system.scm')
-rw-r--r--guix/build/emacs-build-system.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 52c1ea177e..09de244993 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -76,8 +76,18 @@ archive, a directory, or an Emacs Lisp file."
(define* (add-source-to-load-path #:key dummy #:allow-other-keys)
"Augment the EMACSLOADPATH environment variable with the source directory."
(let* ((source-directory (getcwd))
- (emacs-load-path-value (string-append source-directory ":"
- (getenv "EMACSLOADPATH"))))
+ (emacs-load-path (string-split (getenv "EMACSLOADPATH") #\:))
+ ;; XXX: Make sure the Emacs core libraries appear at the end of
+ ;; EMACSLOADPATH, to avoid shadowing any other libraries depended
+ ;; upon.
+ (emacs-load-path-non-core (filter (cut string-contains <>
+ "/share/emacs/site-lisp")
+ emacs-load-path))
+ (emacs-load-path-value (string-append
+ (string-join (cons source-directory
+ emacs-load-path-non-core)
+ ":")
+ ":")))
(setenv "EMACSLOADPATH" emacs-load-path-value)
(format #t "source directory ~s prepended to the `EMACSLOADPATH' \
environment variable\n" source-directory)))