[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs packages

From: Mark H Weaver
Subject: Re: emacs packages
Date: Tue, 16 Jun 2015 12:24:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Federico Beffa <address@hidden> writes:

> (define* (build #:key outputs inputs #:allow-other-keys)
>   "Compile .el files."
>   (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs"))
>          (out (assoc-ref outputs "out"))
>          (name-ver (store-dir->elpa-name-version out))
>          (el-dir (string-append out guix-elpa-packages-path "/" name-ver)))
>     (setenv "SHELL" "sh")
>     (with-directory-excursion el-dir
>       (fold (lambda (f s)
>               (and s (zero? (system* emacs "--batch" "-Q" "-L" el-dir
>                                      "-f" "batch-byte-compile" f))))
>             #t (find-files "." "\\.el$")))))

FYI, this pattern of using 'fold' with 'and' and a boolean seed would be
more transparent if handled by 'every' from (srfi srfi-1):

  (every (lambda (f)
           (zero? (system* emacs "--batch" "-Q" "-L" el-dir
                           "-f" "batch-byte-compile" f)))
         (find-files "." "\\.el$"))

However, this won't be needed here if you use 'emacs-batch-eval' or add
'emacs-byte-compile' as suggested by Ludovic, which I agree is the right


reply via email to

[Prev in Thread] Current Thread [Next in Thread]