diff mbox series

[bug#70632,1/2] aux-files: comp-integrity: Adjust for newer emacs.

Message ID CH3PR84MB3424497FCBC7281536D266D0C5142@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
State New
Headers show
Series [bug#70632,1/2] aux-files: comp-integrity: Adjust for newer emacs. | expand

Commit Message

Morgan Smith April 28, 2024, 5:07 p.m. UTC
* gnu/packages/aux-files/emacs/comp-integrity.el (expect-help): Update with
new terms for function descriptions.  Also return the description instead of
'nil' on failure to aid in debugging.

Change-Id: I63a3644c91dd7817a72ab11ae87ec4fc8fdb2c1b
---

Hello!

Trying to build the latest Emacs from source fails because they changed the
names of this stuff.  I was able to successfully build the latest Emacs with this patch.

Thanks,

Morgan

 gnu/packages/aux-files/emacs/comp-integrity.el | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)


base-commit: 9f183c3627a006e8fd3bb9708448bc05a6204e6d

Comments

Liliana Marie Prikler April 29, 2024, 6:44 p.m. UTC | #1
Hi,

Am Sonntag, dem 28.04.2024 um 13:07 -0400 schrieb Morgan Smith:
> * gnu/packages/aux-files/emacs/comp-integrity.el (expect-help):
> Update with new terms for function descriptions.  Also return the
> description instead of 'nil' on failure to aid in debugging.
> 
> Change-Id: I63a3644c91dd7817a72ab11ae87ec4fc8fdb2c1b
> ---
> 
> Hello!
> 
> Trying to build the latest Emacs from source fails because they
> changed the names of this stuff.  I was able to successfully build
> the latest Emacs with this patch.
> 
> Thanks,
> 
> Morgan
> 
>  gnu/packages/aux-files/emacs/comp-integrity.el | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el
> b/gnu/packages/aux-files/emacs/comp-integrity.el
> index abe7e7c0c9..d969f58622 100644
> --- a/gnu/packages/aux-files/emacs/comp-integrity.el
> +++ b/gnu/packages/aux-files/emacs/comp-integrity.el
> @@ -16,10 +16,16 @@
>                  (let ((desc (substring-no-properties
>                               (with-output-to-string
>                                 (help-fns-function-description-header
> ',fun)))))
> -                  (cond ((string-search "native-compiled" desc)
> 'native)
> -                        ((string-search "byte-compiled" desc) 'byte)
> -                        ((string-search "built-in" desc) 'built-in)
> -                        (t nil))))))))
> +                  (cond ((or (string-search "native-compiled" desc)
> ;; Emacs <= 29
> +                             (string-search "subr-native-elisp"
> desc)) ;; Emacs >= 30
> +                         'native)
> +                        ((or (string-search "byte-compiled" desc) ;;
> Emacs <= 29
> +                             (string-search "compiled-function"
> desc)) ;; Emacs >= 30
> +                         'byte)
> +                        ((or (string-search "built-in" desc) ;;
> Emacs <= 29
> +                             (string-search "primitive-function"
> desc)) ;; Emacs >= 30
> +                         'built-in)
> +                        (t desc))))))))
>  
>    (defmacro expect-native (fun &optional feature)
>      `(progn (expect-help ,fun native ,feature)))
> 
> base-commit: 9f183c3627a006e8fd3bb9708448bc05a6204e6d

the change itself LGTM, but I think it should be accompanied by a
change to Emacs 30 and also we should really try to version it because
it rebuilds Emacs as a whole.  The emacs-team branch hasn't been used
for a while and I think there's nothing big there; and neither is there
a need to exercise it if we just add another file and replace the
phase.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el b/gnu/packages/aux-files/emacs/comp-integrity.el
index abe7e7c0c9..d969f58622 100644
--- a/gnu/packages/aux-files/emacs/comp-integrity.el
+++ b/gnu/packages/aux-files/emacs/comp-integrity.el
@@ -16,10 +16,16 @@ 
                 (let ((desc (substring-no-properties
                              (with-output-to-string
                                (help-fns-function-description-header ',fun)))))
-                  (cond ((string-search "native-compiled" desc) 'native)
-                        ((string-search "byte-compiled" desc) 'byte)
-                        ((string-search "built-in" desc) 'built-in)
-                        (t nil))))))))
+                  (cond ((or (string-search "native-compiled" desc) ;; Emacs <= 29
+                             (string-search "subr-native-elisp" desc)) ;; Emacs >= 30
+                         'native)
+                        ((or (string-search "byte-compiled" desc) ;; Emacs <= 29
+                             (string-search "compiled-function" desc)) ;; Emacs >= 30
+                         'byte)
+                        ((or (string-search "built-in" desc) ;; Emacs <= 29
+                             (string-search "primitive-function" desc)) ;; Emacs >= 30
+                         'built-in)
+                        (t desc))))))))
 
   (defmacro expect-native (fun &optional feature)
     `(progn (expect-help ,fun native ,feature)))