diff --git a/core/core-packages.el b/core/core-packages.el index 035625d60..c8069d0aa 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -903,11 +903,12 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files." (condition-case ex (let ((use-package-expand-minimally t)) (push (expand-file-name "init.el" doom-emacs-dir) compile-targets) - (dolist (target (cl-delete-duplicates (mapcar #'file-truename compile-targets) :test #'string=)) - (when (or (not recompile-p) - (let ((elc-file (byte-compile-dest-file target))) - (and (file-exists-p elc-file) - (file-newer-than-file-p target elc-file)))) + (dolist (target (cl-delete-duplicates (mapcar #'file-truename compile-targets) :test #'equal)) + (when (and (not (string-match-p "/\\(packages\\|doctor\\)\\.el$" target)) + (or (not recompile-p) + (let ((elc-file (byte-compile-dest-file target))) + (and (file-exists-p elc-file) + (file-newer-than-file-p target elc-file))))) (let ((result (if (doom-packages--read-if-cookies target) (byte-compile-file target) 'no-byte-compile))