New macros file-exists-p! & project-file-exists-p!

The latter replaces the doom-project-has! macro
This commit is contained in:
Henrik Lissner
2018-05-24 18:35:42 +02:00
parent b2186745b7
commit 4ee0b5ba6d
6 changed files with 28 additions and 14 deletions

View File

@ -94,12 +94,12 @@ If NOCACHE, don't fetch a cached answer."
(projectile-project-root))))
(defalias 'doom-project-expand #'projectile-expand-root)
(defmacro project-file-exists-p! (files)
"Checks if the project has the specified FILES.
Paths are relative to the project root, unless they start with ./ or ../ (in
which case they're relative to `default-directory'). If they start with a slash,
they are absolute."
they are absolute."
(doom--resolve-path-forms files '(doom-project-root)))
(defun doom-project-find-file (dir)