guix-commits
[Top][All Lists]
Advanced

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

29/30: build: emacs-utils: Use invoke instead of system*.


From: Mark H. Weaver
Subject: 29/30: build: emacs-utils: Use invoke instead of system*.
Date: Fri, 16 Mar 2018 05:03:39 -0400 (EDT)

mhw pushed a commit to branch core-updates
in repository guix.

commit 78374500767332e69b1bb955b43244097fb743cb
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 16 03:07:44 2018 -0400

    build: emacs-utils: Use invoke instead of system*.
    
    * guix/build/emacs-utils.scm (emacs-batch-eval)
    (emacs-batch-edit-file): Use invoke.
---
 guix/build/emacs-utils.scm | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 8389ca5..30aec5b 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Mark H Weaver <address@hidden>
+;;; Copyright © 2014, 2018 Mark H Weaver <address@hidden>
 ;;; Copyright © 2014 Alex Kost <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -18,6 +18,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 +40,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."



reply via email to

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