build-system: emacs: Replace system* with invoke.

* guix/build/emacs-utils.scm: Use (guix build utils) for invoke.
(emacs-batch-eval, emacs-batch-edit-file): Replace system* with invoke.
* guix/build/emacs-build-system.scm (make-autoloads): No need to return #t
explicitly since emacs-generate-autoloads now uses invoke.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
master
Maxim Cournoyer 2018-04-15 22:46:26 -04:00 committed by Arun Isaac
parent 259ed58fef
commit 8a8fa82e72
No known key found for this signature in database
GPG Key ID: 2E25EE8B61802BB3
2 changed files with 8 additions and 9 deletions

View File

@ -228,8 +228,7 @@ store in '.el' files."
(elpa-name (package-name->name+version elpa-name-ver))
(el-dir (string-append out %install-suffix "/" elpa-name-ver)))
(parameterize ((%emacs emacs))
(emacs-generate-autoloads elpa-name el-dir))
#t))
(emacs-generate-autoloads elpa-name el-dir))))
(define (emacs-package? name)
"Check if NAME correspond to the name of an Emacs package."

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -18,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build emacs-utils)
#:use-module (guix build utils)
#:export (%emacs
emacs-batch-eval
emacs-batch-edit-file
@ -39,16 +41,14 @@
(define (emacs-batch-eval expr)
"Run Emacs in batch mode, and execute the elisp code EXPR."
(unless (zero? (system* (%emacs) "--quick" "--batch"
(format #f "--eval=~S" expr)))
(error "emacs-batch-eval failed!" expr)))
(invoke (%emacs) "--quick" "--batch"
(format #f "--eval=~S" expr)))
(define (emacs-batch-edit-file file expr)
"Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
(unless (zero? (system* (%emacs) "--quick" "--batch"
(string-append "--visit=" file)
(format #f "--eval=~S" expr)))
(error "emacs-batch-edit-file failed!" file expr)))
(invoke (%emacs) "--quick" "--batch"
(string-append "--visit=" file)
(format #f "--eval=~S" expr)))
(define (emacs-generate-autoloads name directory)
"Generate autoloads for Emacs package NAME placed in DIRECTORY."