aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-08-15 08:29:28 +0200
committerLars Ingebrigtsen2022-08-15 08:29:28 +0200
commitead4b914ca7cc68d4e6f9edb8a959309a76acc3a (patch)
treeec8f5f0fdd8611365ae6b91a0f108d4dfaaa7192
parentd33a6b9069b6a8272adf720fbb9c1f4a5ec09dd2 (diff)
downloademacs-ead4b914ca7cc68d4e6f9edb8a959309a76acc3a.tar.gz
emacs-ead4b914ca7cc68d4e6f9edb8a959309a76acc3a.zip
Fix up the exclusion logic in loaddefs-generate
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Allow excluding files completely (bug#57144).
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 360b3e4521b..8413373e5d4 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -570,16 +570,15 @@ instead of just updating them with the new/changed autoloads."
570 (time-less-p output-time 570 (time-less-p output-time
571 (file-attribute-modification-time 571 (file-attribute-modification-time
572 (file-attributes file)))) 572 (file-attributes file))))
573 (setq defs (nconc 573 ;; If we're scanning for package versions, we want to look
574 (loaddefs-generate--parse-file 574 ;; at the file even if it's excluded.
575 file output-file 575 (let* ((excluded (member (expand-file-name file dir) excluded-files))
576 ;; We only want the package name from the 576 (package-data
577 ;; excluded files. 577 (and include-package-version (if excluded 'only t))))
578 (and include-package-version 578 (when (or package-data (not excluded))
579 (if (member (expand-file-name file) excluded-files) 579 (setq defs (nconc (loaddefs-generate--parse-file
580 'only 580 file output-file package-data)
581 t))) 581 defs))))))
582 defs))))
583 (progress-reporter-done progress)) 582 (progress-reporter-done progress))
584 583
585 ;; If we have no autoloads data, but we have EXTRA-DATA, then 584 ;; If we have no autoloads data, but we have EXTRA-DATA, then