From: Federico Beffa <beffa@ieee.org>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH 2/5] build: emacs-utils: Add 'emacs-byte-compile-directory'
Date: Sun, 21 Jun 2015 10:29:25 +0200 [thread overview]
Message-ID: <CAKrPhPM69Hany3X4DW4ueq5mi40K6sNbPLYs0+No4wxt5nb=tg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 39 bytes --]
A new general utility for Emacs.
Fede
[-- Attachment #2: 0002-build-emacs-utils-Add-emacs-byte-compile-directory.patch --]
[-- Type: text/x-diff, Size: 1708 bytes --]
From d036941639ecffe8fb29dd9cc7ee9b5fe0e6b10c Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Tue, 16 Jun 2015 21:09:57 +0200
Subject: [PATCH 2/5] build: emacs-utils: Add 'emacs-byte-compile-directory'.
* guix/build/emacs-utils.scm (emacs-byte-compile-directory): New procedure.
---
guix/build/emacs-utils.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 0cff28b..3ecccd9 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -22,6 +22,7 @@
emacs-batch-eval
emacs-batch-edit-file
emacs-generate-autoloads
+ emacs-byte-compile-directory
emacs-substitute-sexps
emacs-substitute-variables))
@@ -57,6 +58,18 @@
(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)
+ (unless (null ,(if (null? dependency-dirs)
+ 'nil
+ dependency-dirs))
+ (setq load-path (append load-path ,dependency-dirs)))
+ (byte-recompile-directory (file-name-as-directory ,dir) 0))))
+ (emacs-batch-eval expr)))
+
(define-syntax emacs-substitute-sexps
(syntax-rules ()
"Substitute the S-expression immediately following the first occurrence of
--
2.2.1
next reply other threads:[~2015-06-21 8:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 8:29 Federico Beffa [this message]
2015-06-21 20:40 ` [PATCH 2/5] build: emacs-utils: Add 'emacs-byte-compile-directory' Alex Kost
2015-06-24 16:13 ` Federico Beffa
2015-06-24 21:07 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKrPhPM69Hany3X4DW4ueq5mi40K6sNbPLYs0+No4wxt5nb=tg@mail.gmail.com' \
--to=beffa@ieee.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.