unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 65478@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>,
	Andrew Tropin <andrew@trop.in>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [bug#65478] [PATCH emacs-team v2] build: emacs-utils: Adjust `emacs-compile-directory' for Emacs 29.
Date: Tue, 29 Aug 2023 09:33:45 +0800	[thread overview]
Message-ID: <ba16b540f92b7ae6ad50bc98cf5deebb43ee85bc.1693272362.git.hako@ultrarare.space> (raw)
In-Reply-To: <5629f5f427c30caa6d43f37ac28c3dd3f1501d01.1692813553.git.hako@ultrarare.space>

* guix/build/emacs-utils.scm (emacs-compile-directory): After native
compilation, write the bytecode file with `comp-write-bytecode-file' when
using Emacs 29.
---
 guix/build/emacs-utils.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index ac3dac57d1..f4c18af388 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -140,6 +140,7 @@ (define* (emacs-compile-directory dir)
        (mapc
         (lambda (file)
           (let (byte-to-native-output-file
+                byte-to-native-output-buffer-file
                 ;; First entry is the eln-cache of the homeless shelter,
                 ;; second entry is the install directory.
                 (eln-dir (and (native-comp-available-p)
@@ -148,13 +149,18 @@ (define* (emacs-compile-directory dir)
                 (native-compile file
                                 (comp-el-to-eln-filename file eln-dir))
                 (byte-compile-file file))
+            ;; After native compilation, write the bytecode file.
+            ;; (For Emacs 28)
             ;; Sadly, we can't use pcase because quasiquote works different in
             ;; Emacs.  See `batch-byte+native-compile' in comp.el for the
             ;; actual shape of byte-to-native-output-file.
             (unless (null byte-to-native-output-file)
               (rename-file (car byte-to-native-output-file)
                            (cdr byte-to-native-output-file)
-                           t))))
+                           t))
+            ;; (For Emacs 29)
+            (unless (null byte-to-native-output-buffer-file)
+              (comp-write-bytecode-file nil))))
        files))
     #:dynamic? #t))
 

base-commit: 9d074e16c7a9879d67c348c7b2d70b725adfbdfa
-- 
2.41.0





  parent reply	other threads:[~2023-08-29  1:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 18:00 [bug#65478] [PATCH emacs-team] gnu: emacs-flim-lb: Explicitly compile files to bytecode Hilton Chain via Guix-patches via
2023-08-27  6:24 ` Liliana Marie Prikler
2023-08-27 12:52   ` Hilton Chain via Guix-patches via
2023-08-27 15:13     ` Liliana Marie Prikler
2023-08-27 15:39       ` Hilton Chain via Guix-patches via
2023-08-27 15:49         ` Liliana Marie Prikler
2023-08-28  4:21           ` Hilton Chain via Guix-patches via
2023-08-28 18:28             ` Liliana Marie Prikler
2023-08-29  1:33 ` Hilton Chain via Guix-patches via [this message]
2023-08-30 19:40   ` [bug#65478] [PATCH emacs-team v2] build: emacs-utils: Adjust `emacs-compile-directory' for Emacs 29 Liliana Marie Prikler
2023-09-01 16:14     ` Hilton Chain via Guix-patches via
2023-09-01 16:15 ` [bug#65478] [PATCH emacs-team v3] " Hilton Chain via Guix-patches via
2023-09-01 19:37   ` Liliana Marie Prikler
2023-09-09  8:23     ` bug#65478: " Liliana Marie Prikler

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=ba16b540f92b7ae6ad50bc98cf5deebb43ee85bc.1693272362.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=65478@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=hako@ultrarare.space \
    --cc=liliana.prikler@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).