Remove witout-project-cache!, rename project-file-exists-p

To doom-project-file-exists-p, which is now a function.
This commit is contained in:
Henrik Lissner 2019-07-21 15:47:14 +02:00
parent 7058facf9d
commit 832b7e9294
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 23 deletions

View file

@ -2,8 +2,7 @@
(defvar projectile-project-root nil)
;;;###autoload
(autoload 'projectile-relevant-known-projects "projectile")
;;;###autoload (autoload 'projectile-relevant-known-projects "projectile")
;;;###autodef
(cl-defun set-project-type! (name &key predicate compile run test configure dir)
@ -24,22 +23,12 @@
;;; Macros
;;;###autoload
(defmacro without-project-cache! (&rest body)
"Run BODY with projectile's project-root cache disabled. This is necessary if
you want to interactive with a project other than the one you're in."
`(let ((projectile-project-root-cache (make-hash-table :test 'equal))
projectile-project-name
projectile-project-root
projectile-require-project-root)
,@body))
;;;###autoload
(defmacro project-file-exists-p! (files)
(defun doom-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."
`(file-exists-p! ,files (doom-project-root)))
(file-exists-p! files (doom-project-root)))
;;