diff --git a/init.el b/init.el index 6f91657..dae3a0d 100644 --- a/init.el +++ b/init.el @@ -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