diff options
| author | Jim Porter | 2023-07-31 23:10:03 -0700 |
|---|---|---|
| committer | Jim Porter | 2023-08-01 18:14:35 -0700 |
| commit | da5e05a50e8713f5efb51567645822fa5bfdd6b7 (patch) | |
| tree | 3570eaca7e25a0b33777e5a83d7aceaa0b7aae6b | |
| parent | 608a8757d9fa54bc2fd57180b0347931db9c46b0 (diff) | |
| download | emacs-da5e05a50e8713f5efb51567645822fa5bfdd6b7.tar.gz emacs-da5e05a50e8713f5efb51567645822fa5bfdd6b7.zip | |
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
(bug#64985).
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5df1205869c..65ccb60726f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1922,6 +1922,8 @@ also be compiled." | |||
| 1922 | (emacs-lisp-compilation-mode)) | 1922 | (emacs-lisp-compilation-mode)) |
| 1923 | (let ((directories (list default-directory)) | 1923 | (let ((directories (list default-directory)) |
| 1924 | (default-directory default-directory) | 1924 | (default-directory default-directory) |
| 1925 | (ignore-files-regexp | ||
| 1926 | (mapconcat #'identity byte-compile-ignore-files "\\|")) | ||
| 1925 | (skip-count 0) | 1927 | (skip-count 0) |
| 1926 | (fail-count 0) | 1928 | (fail-count 0) |
| 1927 | (file-count 0) | 1929 | (file-count 0) |
| @@ -1942,9 +1944,7 @@ also be compiled." | |||
| 1942 | (or (null arg) (eq 0 arg) | 1944 | (or (null arg) (eq 0 arg) |
| 1943 | (y-or-n-p (concat "Check " source "? "))) | 1945 | (y-or-n-p (concat "Check " source "? "))) |
| 1944 | ;; Directory is requested to be ignored | 1946 | ;; Directory is requested to be ignored |
| 1945 | (not (string-match-p | 1947 | (not (string-match-p ignore-files-regexp source)) |
| 1946 | (regexp-opt byte-compile-ignore-files) | ||
| 1947 | source)) | ||
| 1948 | (setq directories (nconc directories (list source)))) | 1948 | (setq directories (nconc directories (list source)))) |
| 1949 | ;; It is an ordinary file. Decide whether to compile it. | 1949 | ;; It is an ordinary file. Decide whether to compile it. |
| 1950 | (if (and (string-match emacs-lisp-file-regexp source) | 1950 | (if (and (string-match emacs-lisp-file-regexp source) |
| @@ -1954,9 +1954,7 @@ also be compiled." | |||
| 1954 | (not (auto-save-file-name-p source)) | 1954 | (not (auto-save-file-name-p source)) |
| 1955 | (not (member source (dir-locals--all-files directory))) | 1955 | (not (member source (dir-locals--all-files directory))) |
| 1956 | ;; File is requested to be ignored | 1956 | ;; File is requested to be ignored |
| 1957 | (not (string-match-p | 1957 | (not (string-match-p ignore-files-regexp source))) |
| 1958 | (regexp-opt byte-compile-ignore-files) | ||
| 1959 | source))) | ||
| 1960 | (progn (cl-incf | 1958 | (progn (cl-incf |
| 1961 | (pcase (byte-recompile-file source force arg) | 1959 | (pcase (byte-recompile-file source force arg) |
| 1962 | ('no-byte-compile skip-count) | 1960 | ('no-byte-compile skip-count) |