Fix a bunch of my/project-run stuff

This commit is contained in:
Alexander Rosenberg 2023-10-10 14:14:30 -07:00
parent 55bff4f149
commit 31f7e4b6c9
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

27
init.el
View File

@ -465,18 +465,27 @@ visual states."
(defun my/project-run (command comint)
"Like `project-compile', but for running a project.
COMMAND and COMINT are like `compile'."
(interactive (list (or my/project-run-command
(let ((default-directory (my/project-get-root-dir)))
(read-shell-command "Run Command: "
(car my/-project-run-history)
'(my/-project-run-history . 1))))
(consp current-prefix-arg)))
(interactive
(list
(let ((default-directory (my/project-get-root-dir)))
(read-shell-command "Run Command: "
(or my/project-run-command
(car my/-project-run-history))
(if (and my/project-run-command
(equal my/project-run-command
(car-safe my/-project-run-history)))
'(my/-project-run-history . 1)
'my/-project-run-history)))
(consp current-prefix-arg)))
(let* ((default-directory (my/project-get-root-dir))
(compilation-buffer-name-function (lambda (_)
(progn "*run project*")))
(compilation-directory default-directory)
(compile-history nil))
(compile command comint))))
(compile-history nil)
(compile-command nil))
(compile command comint)
(when (not my/project-run-command)
(setq my/project-run-command command)))))
;; rust
(use-package rust-mode)
@ -487,7 +496,7 @@ COMMAND and COMINT are like `compile'."
;; yaml
(use-package yaml-mode)
;; yuck-mode
;; yuck (config language for eww)
(use-package yuck-mode)
;; sly