summaryrefslogtreecommitdiff
path: root/guix/build/emacs-utils.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2018-01-13 17:54:18 -0500
committerLudovic Courtès <ludo@gnu.org>2018-02-05 16:54:27 +0100
commitb7dee6a0b8af90e5adaa5b35f8dda359de96868d (patch)
treeedd266524750565494bd10011031f271dc546c3d /guix/build/emacs-utils.scm
parenta5e03674d1c5a3ea2e188b909a14ce1ac87b8773 (diff)
downloadgnu-guix-b7dee6a0b8af90e5adaa5b35f8dda359de96868d.tar
gnu-guix-b7dee6a0b8af90e5adaa5b35f8dda359de96868d.tar.gz
emacs-build-system: Add set-emacs-load-path phase.
This generalizes the mechanism by which the Emacs dependencies are made visible, so that any build phase can make use of them. * guix/build/emacs-build-system.scm (%legacy-install-suffix): New variable. (%install-suffix): Redefine in terms of %legacy-install-suffix. (set-emacs-load-path): Add new phase used for dependency resolution. (build): Remove ad-hoc dependency discovery mechanism. (emacs-input->el-directory): Add new procedure. (emacs-inputs-el-directories): Use it. (package-name-version->elpa-name-version): Fix typo. (%standard-phases): Include the new `set-emacs-load-path' phase. Refactor to make the ordering of the phases clearer. * guix/build/emacs-utils.scm (emacs-byte-compile-directory): Remove the optional `dependency-dirs' argument, which is now obsoleted by the `set-emacs-load-path' phase. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/build/emacs-utils.scm')
-rw-r--r--guix/build/emacs-utils.scm11
1 files changed, 3 insertions, 8 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index fd06aad7ac..8389ca582f 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -58,14 +58,9 @@
(update-directory-autoloads ,directory))))
(emacs-batch-eval expr)))
-(define* (emacs-byte-compile-directory dir #:optional (dependency-dirs '()))
- "Byte compile all files in DIR and its sub-directories. Before compiling
-the files, add DIR and all directories in DEPENDENCY-DIRS to 'load-path'."
- (let ((expr `(progn
- (add-to-list 'load-path ,dir)
- (when ',dependency-dirs
- (setq load-path (append ',dependency-dirs load-path)))
- (byte-recompile-directory (file-name-as-directory ,dir) 0))))
+(define* (emacs-byte-compile-directory dir)
+ "Byte compile all files in DIR and its sub-directories."
+ (let ((expr `(byte-recompile-directory (file-name-as-directory ,dir) 0)))
(emacs-batch-eval expr)))
(define-syntax emacs-substitute-sexps