New macros file-exists-p! & project-file-exists-p!
The latter replaces the doom-project-has! macro
This commit is contained in:
parent
b2186745b7
commit
4ee0b5ba6d
6 changed files with 28 additions and 14 deletions
|
@ -6,7 +6,7 @@
|
|||
(interactive)
|
||||
(unless (memq major-mode '(c-mode c++-mode objc-mode))
|
||||
(user-error "Not a C/C++/ObjC buffer"))
|
||||
(unless (doom-project-has! "compile_commands.json")
|
||||
(unless (project-file-exists-p! "compile_commands.json")
|
||||
(user-error "No compile_commands.json file"))
|
||||
;; first rtag
|
||||
(when (and (featurep 'rtags)
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +java|android-mode-maybe ()
|
||||
(when (doom-project-has! (or "local.properties"
|
||||
"AndroidManifest.xml"
|
||||
"src/main/AndroidManifest.xml"))
|
||||
(when (project-file-exists-p! (or "local.properties"
|
||||
"AndroidManifest.xml"
|
||||
"src/main/AndroidManifest.xml"))
|
||||
(android-mode +1)
|
||||
(doom/set-build-command "./gradlew %s" "build.gradle")))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue