Exclude {packages,doctor}.el from make compile

These two files shouldn't be byte-compiled. Until now it was expected
that you'd include a no-byte-compile: t header in these files. This is
more convenient.
This commit is contained in:
Henrik Lissner 2018-05-16 18:13:04 +02:00
parent 673d3ed147
commit a1e49d174a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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))