From ec4e198fb9c87653d1e65288969bed1ff548683c Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Mon, 31 Jul 2023 23:10:03 -0700 Subject: [PATCH] Fix handling of ".elpaignore" file when compiling packages * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Treat 'byte-compile-ignore-files' as a list of regexps per its docstring. --- lisp/emacs-lisp/bytecomp.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5b1d958e6c2..d123e68a088 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1995,9 +1995,8 @@ byte-recompile-directory (or (null arg) (eq 0 arg) (y-or-n-p (concat "Check " source "? "))) ;; Directory is requested to be ignored - (not (string-match-p - (regexp-opt byte-compile-ignore-files) - source)) + (not (seq-some (lambda (ex) (string-match-p ex source)) + byte-compile-ignore-files)) (setq directories (nconc directories (list source)))) ;; It is an ordinary file. Decide whether to compile it. (if (and (string-match emacs-lisp-file-regexp source) @@ -2007,9 +2006,8 @@ byte-recompile-directory (not (auto-save-file-name-p source)) (not (member source (dir-locals--all-files directory))) ;; File is requested to be ignored - (not (string-match-p - (regexp-opt byte-compile-ignore-files) - source))) + (not (seq-some (lambda (ex) (string-match-p ex source)) + byte-compile-ignore-files))) (progn (cl-incf (pcase (byte-recompile-file source force arg) ('no-byte-compile skip-count) -- 2.25.1