diff mbox series

[bug#65478,emacs-team,v3] build: emacs-utils: Adjust `emacs-compile-directory' for Emacs 29.

Message ID 40fb61f0682e94c0fe402efad0193463e1f8b6bf.1693583097.git.hako@ultrarare.space
State New
Headers show
Series [bug#65478,emacs-team,v3] build: emacs-utils: Adjust `emacs-compile-directory' for Emacs 29. | expand

Commit Message

Hilton Chain Sept. 1, 2023, 4:15 p.m. UTC
* guix/build/emacs-utils.scm (emacs-compile-directory): After native
compilation, write the bytecode file with `comp-write-bytecode-file'.
---
 guix/build/emacs-utils.scm | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)


base-commit: 9d074e16c7a9879d67c348c7b2d70b725adfbdfa

Comments

Liliana Marie Prikler Sept. 1, 2023, 7:37 p.m. UTC | #1
Am Samstag, dem 02.09.2023 um 00:15 +0800 schrieb Hilton Chain:
> * guix/build/emacs-utils.scm (emacs-compile-directory): After native
> compilation, write the bytecode file with `comp-write-bytecode-file'.
> ---
>  guix/build/emacs-utils.scm | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
> index ac3dac57d1..8e12b5b6d4 100644
> --- a/guix/build/emacs-utils.scm
> +++ b/guix/build/emacs-utils.scm
> @@ -139,7 +139,7 @@ (define* (emacs-compile-directory dir)
>             (files (directory-files-recursively ,dir "\\.el$")))
>         (mapc
>          (lambda (file)
> -          (let (byte-to-native-output-file
> +          (let (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 +148,9 @@ (define* (emacs-compile-directory dir)
>                  (native-compile file
>                                  (comp-el-to-eln-filename file eln-
> dir))
>                  (byte-compile-file file))
> -            ;; 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))))
> +            ;; After native compilation, write the bytecode file.
> +            (unless (null byte-to-native-output-buffer-file)
> +              (comp-write-bytecode-file nil))))
>         files))
>      #:dynamic? #t))
LGTM, at least regarding emacs-flim-lb.  I have it applied locally with
the fancy quotes made extra fancy; will wait for CI before pushing,
however.

Cheers
Liliana Marie Prikler Sept. 9, 2023, 8:23 a.m. UTC | #2
Am Freitag, dem 01.09.2023 um 21:37 +0200 schrieb Liliana Marie
Prikler:
> will wait for CI before pushing, however.
Looks like CI doesn't know whether it ought to build stuff; pushed as
it LGTM.

Cheers
diff mbox series

Patch

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index ac3dac57d1..8e12b5b6d4 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -139,7 +139,7 @@  (define* (emacs-compile-directory dir)
            (files (directory-files-recursively ,dir "\\.el$")))
        (mapc
         (lambda (file)
-          (let (byte-to-native-output-file
+          (let (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 +148,9 @@  (define* (emacs-compile-directory dir)
                 (native-compile file
                                 (comp-el-to-eln-filename file eln-dir))
                 (byte-compile-file file))
-            ;; 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))))
+            ;; After native compilation, write the bytecode file.
+            (unless (null byte-to-native-output-buffer-file)
+              (comp-write-bytecode-file nil))))
        files))
     #:dynamic? #t))