diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-15 08:29:28 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-15 08:29:28 +0200 |
commit | ead4b914ca7cc68d4e6f9edb8a959309a76acc3a (patch) | |
tree | ec8f5f0fdd8611365ae6b91a0f108d4dfaaa7192 /lisp/emacs-lisp | |
parent | d33a6b9069b6a8272adf720fbb9c1f4a5ec09dd2 (diff) | |
download | emacs-ead4b914ca7cc68d4e6f9edb8a959309a76acc3a.tar.gz emacs-ead4b914ca7cc68d4e6f9edb8a959309a76acc3a.tar.bz2 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).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/loaddefs-gen.el | 19 |
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." (time-less-p output-time (file-attribute-modification-time (file-attributes file)))) - (setq defs (nconc - (loaddefs-generate--parse-file - file output-file - ;; We only want the package name from the - ;; excluded files. - (and include-package-version - (if (member (expand-file-name file) excluded-files) - 'only - t))) - defs)))) + ;; If we're scanning for package versions, we want to look + ;; at the file even if it's excluded. + (let* ((excluded (member (expand-file-name file dir) excluded-files)) + (package-data + (and include-package-version (if excluded 'only t)))) + (when (or package-data (not excluded)) + (setq defs (nconc (loaddefs-generate--parse-file + file output-file package-data) + defs)))))) (progress-reporter-done progress)) ;; If we have no autoloads data, but we have EXTRA-DATA, then |