From dea74acb7ac6df540559a4041f5dd23cd654117b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Jun 2022 13:11:31 +0200 Subject: [PATCH] fix(lib): void-variable error in doom/add-directory-as-project And clarify how it differs from projectile-add-known-project in the command's docstring. --- core/autoload/projects.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/autoload/projects.el b/core/autoload/projects.el index e17dcd0ba..d36a12176 100644 --- a/core/autoload/projects.el +++ b/core/autoload/projects.el @@ -72,7 +72,9 @@ they are absolute." ;;;###autoload (defun doom/add-directory-as-project (dir) "Register an arbitrary directory as a project. -If DIR is not a valid project, a .project file will be created within it. This + +Unlike `projectile-add-known-project', if DIR isn't a valid project, a .project +file will be created within it so that it will always be treated as one. This command will throw an error if a parent of DIR is a valid project (which would mask DIR)." (interactive "D") @@ -85,7 +87,7 @@ mask DIR)." short-dir (abbreviate-file-name proj-dir))) (message "%S was not a project; adding .project file to it" short-dir (abbreviate-file-name proj-dir)) - (projectile-add-known-project directory)))) + (projectile-add-known-project dir)))) ;;