doom/compile: don't count excluded test files

This commit is contained in:
Henrik Lissner 2017-07-14 19:49:54 +02:00
parent f467c29252
commit f0fc5c5281
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -592,12 +592,13 @@ If ONLY-RECOMPILE-P is non-nil, only recompile out-of-date files."
else if (file-exists-p path) else if (file-exists-p path)
collect path))) collect path)))
(dolist (file el-files) (dolist (file el-files)
(when (and (not (string-match-p "/test/.+\\.el$" file)) (when (or (not only-recompile-p)
(or (not only-recompile-p) (let ((elc-file (byte-compile-dest-file file)))
(let ((elc-file (byte-compile-dest-file file))) (and (file-exists-p elc-file)
(and (file-exists-p elc-file) (file-newer-than-file-p file elc-file))))
(file-newer-than-file-p file elc-file))))) (let ((result (if (string-match-p "/test/.+\\.el$" file)
(let ((result (byte-compile-file file)) 'no-byte-compile
(byte-compile-file file)))
(short-name (file-relative-name file doom-emacs-dir))) (short-name (file-relative-name file doom-emacs-dir)))
(cl-incf (cl-incf
(cond ((eq result 'no-byte-compile) (cond ((eq result 'no-byte-compile)