all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 39375@debbugs.gnu.org
Subject: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 31 Jan 2020 21:02:23 +0100	[thread overview]
Message-ID: <20200131200222.23792-1-leo.prikler@student.tugraz.at> (raw)

* 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=~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."
-- 
2.25.0

             reply	other threads:[~2020-01-31 20:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 20:02 Leo Prikler [this message]
2020-02-27 10:38 ` [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next Pierre Neidhardt
2020-02-27 10:54   ` Leo Prikler
2020-02-27 13:20     ` Pierre Neidhardt
2020-02-28  9:55       ` Leo Prikler
2020-02-28 10:05         ` Pierre Neidhardt
2020-02-28 14:50 ` Maxim Cournoyer
2020-02-28 15:26   ` Maxim Cournoyer
2021-08-30 20:16   ` Maxim Cournoyer
2021-08-30 21:33     ` Leo Prikler
2021-08-31  2:44       ` bug#39375: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200131200222.23792-1-leo.prikler@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=39375@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.