mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-01 07:16:39 +01:00
build: emacs-utils: Use invoke instead of system*.
* guix/build/emacs-utils.scm (emacs-batch-eval) (emacs-batch-edit-file): Use invoke.
This commit is contained in:
parent
469de8c3fa
commit
7837450076
1 changed files with 7 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
|
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (guix build emacs-utils)
|
(define-module (guix build emacs-utils)
|
||||||
|
#:use-module (guix build utils)
|
||||||
#:export (%emacs
|
#:export (%emacs
|
||||||
emacs-batch-eval
|
emacs-batch-eval
|
||||||
emacs-batch-edit-file
|
emacs-batch-edit-file
|
||||||
|
@ -39,16 +40,14 @@ (define %emacs
|
||||||
|
|
||||||
(define (emacs-batch-eval expr)
|
(define (emacs-batch-eval expr)
|
||||||
"Run Emacs in batch mode, and execute the elisp code EXPR."
|
"Run Emacs in batch mode, and execute the elisp code EXPR."
|
||||||
(unless (zero? (system* (%emacs) "--quick" "--batch"
|
(invoke (%emacs) "--quick" "--batch"
|
||||||
(format #f "--eval=~S" expr)))
|
(format #f "--eval=~S" expr)))
|
||||||
(error "emacs-batch-eval failed!" expr)))
|
|
||||||
|
|
||||||
(define (emacs-batch-edit-file file expr)
|
(define (emacs-batch-edit-file file expr)
|
||||||
"Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
|
"Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
|
||||||
(unless (zero? (system* (%emacs) "--quick" "--batch"
|
(invoke (%emacs) "--quick" "--batch"
|
||||||
(string-append "--visit=" file)
|
(string-append "--visit=" file)
|
||||||
(format #f "--eval=~S" expr)))
|
(format #f "--eval=~S" expr)))
|
||||||
(error "emacs-batch-edit-file failed!" file expr)))
|
|
||||||
|
|
||||||
(define (emacs-generate-autoloads name directory)
|
(define (emacs-generate-autoloads name directory)
|
||||||
"Generate autoloads for Emacs package NAME placed in DIRECTORY."
|
"Generate autoloads for Emacs package NAME placed in DIRECTORY."
|
||||||
|
|
Loading…
Reference in a new issue