emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/projectile d4d5b2b34e 3/4: Touch up recently added functio


From: ELPA Syncer
Subject: [nongnu] elpa/projectile d4d5b2b34e 3/4: Touch up recently added functions
Date: Sun, 30 Oct 2022 11:59:22 -0400 (EDT)

branch: elpa/projectile
commit d4d5b2b34ece991d9353d7d7b8546fda767ad49d
Author: Bozhidar Batsov <bozhidar@batsov.dev>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Touch up recently added functions
---
 projectile.el | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/projectile.el b/projectile.el
index 0fcdcdaaab..78cb59af33 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]