From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:39291) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixcVM-0001Pu-9L for guix-patches@gnu.org; Fri, 31 Jan 2020 15:03:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixcVL-00016n-96 for guix-patches@gnu.org; Fri, 31 Jan 2020 15:03:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixcVL-00012F-64 for guix-patches@gnu.org; Fri, 31 Jan 2020 15:03:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ixcVK-00041L-3q for guix-patches@gnu.org; Fri, 31 Jan 2020 15:03:02 -0500 Subject: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:39014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixcV0-00014b-6P for guix-patches@gnu.org; Fri, 31 Jan 2020 15:02:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixcUy-0000JH-Jl for guix-patches@gnu.org; Fri, 31 Jan 2020 15:02:41 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:30190) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ixcUy-0000Dt-3H for guix-patches@gnu.org; Fri, 31 Jan 2020 15:02:40 -0500 Received: from localhost.localdomain (194-118-251-194.hdsl.highway.telekom.at [194.118.251.194]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 488Sn80YsSz1LgFk for ; Fri, 31 Jan 2020 21:02:35 +0100 (CET) From: Leo Prikler Date: Fri, 31 Jan 2020 21:02:23 +0100 Message-Id: <20200131200222.23792-1-leo.prikler@student.tugraz.at> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39375@debbugs.gnu.org * 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). --- guix/build/emacs-utils.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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=3D~S" expr))) =20 +(define (emacs-batch-eval* . exprs) + "Run Emacs in batch mode, and execute all of the elisp expressions EXP= RS." + (apply invoke (%emacs) "--quick" "--batch" + (map + (lambda (expr) + (format #f "--eval=3D~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))) =20 (define* (emacs-byte-compile-directory dir) "Byte compile all files in DIR and its sub-directories." --=20 2.25.0