From: Joseph Turner Date: Sat, 2 Sep 2023 17:14:22 +0000 (-0700) Subject: Don't native compile lock files X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94431c0d2f645ff509af2fc841fa264492c8ac93;p=emacs.git Don't native compile lock files * lisp/emacs-lisp/package.el (package--delete-directory): Exclude lock files in regex. (Bug#65666) --- diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 43842cfea73..3a019905960 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2487,7 +2487,9 @@ Clean-up the corresponding .eln files if Emacs is native compiled." (when (featurep 'native-compile) (cl-loop - for file in (directory-files-recursively dir "\\.el\\'") + for file in (directory-files-recursively dir + ;; Exclude lockfiles + (rx bos (or (and "." (not "#")) (not ".")) (* nonl) ".el" eos)) do (comp-clean-up-stale-eln (comp-el-to-eln-filename file)))) (if (file-symlink-p (directory-file-name dir)) (delete-file (directory-file-name dir))