Fix my/project-run

This commit is contained in:
Alexander Rosenberg 2023-10-20 02:29:29 -07:00
parent 6379097260
commit cb992945f3
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

10
init.el
View File

@ -501,9 +501,13 @@ visual states."
"Commands previously run with `my/project-run'") "Commands previously run with `my/project-run'")
(defun my/project-get-root-dir () (defun my/project-get-root-dir ()
"Get the root dir for the current project" "Get the root dir for the current project"
(let ((proj (project-current nil))) (let* ((proj (project-current nil))
(or my/project-run-dir (default-directory (if proj
(if proj (project-root proj) default-directory)))) (project-root proj)
default-directory)))
(if my/project-run-dir
(expand-file-name my/project-run-dir)
default-directory)))
(defun my/project-run (command comint) (defun my/project-run (command comint)
"Like `project-compile', but for running a project. "Like `project-compile', but for running a project.
COMMAND and COMINT are like `compile'." COMMAND and COMINT are like `compile'."