diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index d4c0a87e6f9..6a40b3d84b0 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -662,7 +662,14 @@ instead of just updating them with the new/changed autoloads." (file-attributes file)))) ;; If we're scanning for package versions, we want to look ;; at the file even if it's excluded. - (let* ((excluded (member file excluded-files)) + (let* ((excluded + ;; FIXME: In out-of-tree builds (bug#79694) `excluded.files' + ;; (derived via `lisp-directory' from `invocation-directory') + ;; may end up using names which don't quite match those of + ;; `file' (derived from the command line arguments), w.r.t + ;; "c:" vs "C:", so use a test more lax than `member'. + (let ((x (member-ignore-case file excluded-files))) + (and x (file-equal-p file (car x))))) (package-data (and include-package-version (if excluded 'only t)))) (when (or package-data (not excluded))