guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#65478] [PATCH emacs-team v2] build: emacs-utils: Adjust `emacs-comp


From: Hilton Chain
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

* 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]