diff options
author | Leo Prikler <leo.prikler@student.tugraz.at> | 2020-01-31 21:02:23 +0100 |
---|---|---|
committer | Guix Patches Tester <> | 2020-01-31 20:04:07 +0000 |
commit | 53b9c56c900a290bed281fb49d2c7a8ab81c6453 (patch) | |
tree | a84f2ea24f268e506cf0ab403cffcfca48d6a277 | |
parent | 2032d8473d11711b88fd3e48644c569dee32fa42 (diff) | |
download | patches-53b9c56c900a290bed281fb49d2c7a8ab81c6453.tar patches-53b9c56c900a290bed281fb49d2c7a8ab81c6453.tar.gz |
gnu: emacs-utils: Port to emacs-next.series-2776
* guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
(emacs-generate-autoloads): Redefine in terms of emacs-batch-eval*.
Require autoload (needed with emacs-next).
-rw-r--r-- | guix/build/emacs-utils.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 885fd0a217..1462f9d0af 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -23,6 +23,7 @@ #:use-module (guix build utils) #:export (%emacs emacs-batch-eval + emacs-batch-eval* emacs-batch-edit-file emacs-batch-disable-compilation emacs-generate-autoloads @@ -46,6 +47,14 @@ (invoke (%emacs) "--quick" "--batch" (format #f "--eval=~S" expr))) +(define (emacs-batch-eval* . exprs) + "Run Emacs in batch mode, and execute all of the elisp expressions EXPRS." + (apply invoke (%emacs) "--quick" "--batch" + (map + (lambda (expr) + (format #f "--eval=~S" expr)) + exprs))) + (define (emacs-batch-edit-file file expr) "Load FILE in Emacs using batch mode, and execute the elisp code EXPR." (invoke (%emacs) "--quick" "--batch" @@ -64,7 +73,7 @@ (expr `(let ((backup-inhibited t) (generated-autoload-file ,file)) (update-directory-autoloads ,directory)))) - (emacs-batch-eval expr))) + (emacs-batch-eval* '(require 'autoload) expr))) (define* (emacs-byte-compile-directory dir) "Byte compile all files in DIR and its sub-directories." |