Fix a bunch of my/project-run stuff
This commit is contained in:
parent
55bff4f149
commit
31f7e4b6c9
21
init.el
21
init.el
@ -465,18 +465,27 @@ visual states."
|
|||||||
(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'."
|
||||||
(interactive (list (or my/project-run-command
|
(interactive
|
||||||
|
(list
|
||||||
(let ((default-directory (my/project-get-root-dir)))
|
(let ((default-directory (my/project-get-root-dir)))
|
||||||
(read-shell-command "Run Command: "
|
(read-shell-command "Run Command: "
|
||||||
(car my/-project-run-history)
|
(or my/project-run-command
|
||||||
'(my/-project-run-history . 1))))
|
(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)))
|
(consp current-prefix-arg)))
|
||||||
(let* ((default-directory (my/project-get-root-dir))
|
(let* ((default-directory (my/project-get-root-dir))
|
||||||
(compilation-buffer-name-function (lambda (_)
|
(compilation-buffer-name-function (lambda (_)
|
||||||
(progn "*run project*")))
|
(progn "*run project*")))
|
||||||
(compilation-directory default-directory)
|
(compilation-directory default-directory)
|
||||||
(compile-history nil))
|
(compile-history nil)
|
||||||
(compile command comint))))
|
(compile-command nil))
|
||||||
|
(compile command comint)
|
||||||
|
(when (not my/project-run-command)
|
||||||
|
(setq my/project-run-command command)))))
|
||||||
|
|
||||||
;; rust
|
;; rust
|
||||||
(use-package rust-mode)
|
(use-package rust-mode)
|
||||||
@ -487,7 +496,7 @@ COMMAND and COMINT are like `compile'."
|
|||||||
;; yaml
|
;; yaml
|
||||||
(use-package yaml-mode)
|
(use-package yaml-mode)
|
||||||
|
|
||||||
;; yuck-mode
|
;; yuck (config language for eww)
|
||||||
(use-package yuck-mode)
|
(use-package yuck-mode)
|
||||||
|
|
||||||
;; sly
|
;; sly
|
||||||
|
Loading…
Reference in New Issue
Block a user