aboutsummaryrefslogtreecommitdiff
path: root/projectile.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2022-10-30 17:18:12 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2022-10-30 17:18:12 +0200
commitd4d5b2b34ece991d9353d7d7b8546fda767ad49d (patch)
tree3ad10b19cf9f8ddc6260cd59bfe3797ff92bf1a5 /projectile.el
parentbf1b7b1faa5b3c3751a4a283a8a263a24845d4ff (diff)
Touch up recently added functions
Diffstat (limited to 'projectile.el')
-rw-r--r--projectile.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/projectile.el b/projectile.el
index 0fcdcda..78cb59a 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2427,27 +2427,23 @@ With a prefix arg INVALIDATE-CACHE invalidates the cache first."
(defun projectile-add-dir-local-variable (mode variable value)
"Run `add-dir-local-variable' with .dir-locals.el in root of project.
-Parameters MODE VARIABLE VALUE are passed directly to `add-dir-local-variable'"
+Parameters MODE VARIABLE VALUE are passed directly to `add-dir-local-variable'."
(let ((inhibit-read-only t)
- (default-directory (projectile-project-root)))
- (unless default-directory
- (error "Setting dir-local variable in non-existing projectile project was requested"))
+ (default-directory (projectile-acquire-root)))
(add-dir-local-variable mode variable value)
(save-buffer)
- (kill-buffer) ))
+ (kill-buffer)))
;;;###autoload
(defun projectile-delete-dir-local-variable (mode variable)
"Run `delete-dir-local-variable' with .dir-locals.el in root of project.
-Parameters MODE VARIABLE VALUE are passed directly to `delete-dir-local-variable'"
+Parameters MODE VARIABLE VALUE are passed directly to `delete-dir-local-variable'."
(let ((inhibit-read-only t)
- (default-directory (projectile-project-root)))
- (unless default-directory
- (error "Setting dir-local variable in non-existing projectile project was requested"))
+ (default-directory (projectile-acquire-root)))
(delete-dir-local-variable mode variable)
(save-buffer)
- (kill-buffer) ))
+ (kill-buffer)))
;;;; Sorting project files