From d1c052b80a3248b4978a017044563f9d50ce8ed4 Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 1 Feb 2026 18:18:11 +1300 Subject: [PATCH] Handle compressed filenames in `native--compile-async-skip-p' (bug#57627) * lisp/emacs-lisp/comp-run.el (native--compile-async-skip-p): Process *.el.gz filenames as if they were *.el filenames. --- lisp/emacs-lisp/comp-run.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index 3826d8482a6..f329d627392 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -159,6 +159,11 @@ if `confirm-kill-processes' is non-nil." "Return non-nil if FILE's compilation should be skipped. LOAD and SELECTOR work as described in `native--compile-async'." + ;; Reduce the FILE extension .el.gz to .el + (when (equal (file-name-extension file) "gz") + (let ((filenogz (file-name-sans-extension file))) + (when (string-match-p "\\.el\\'" filenogz) + (setq file filenogz)))) ;; Make sure we are not already compiling `file' (bug#40838). (or (gethash file comp-async-compilations) (gethash (file-name-with-extension file "elc") comp--no-native-compile)