Subject: bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup

From: Phil Sainty <[email-masked]>
Date: Wed, 16 Oct 2024 02:01:56 +1300

On 2024-10-14 11:12, Andrea Corallo wrote:
> +  (let ((file (save-match-data
> +                (if (string-match (rx (group-n 1 (one-or-more nonl)
> ".el") ".gz" eol)
> +                                  file)
> +                    (match-string 1 file)
> +                  file))))

Newlines are valid in filenames, though.  Maybe start with the file
name extension function?

  (when (equal (file-name-extension file) "gz")
    (let ((filenogz (file-name-sans-extension file)))
      (when (string-match-p "\\.el\\'" filenogz)
        (setq file filenogz))))

As a by-product, that will also support filenames with version
strings attached.  (Assuming that's a good thing here.)

(Also: Maybe not a practical issue here, but if Emacs supports
loading compressed elisp files using any compression format
besides .gz then maybe this should be more general.)

-Phil