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.
This commit is contained in:
Phil Sainty 2026-02-01 18:18:11 +13:00
parent 652df742c3
commit d1c052b80a

View file

@ -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)