From 31f7e4b6c9c5ff475feb9165890a319e3fd06914 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Tue, 10 Oct 2023 14:14:30 -0700 Subject: [PATCH] Fix a bunch of my/project-run stuff --- init.el | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) 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