]> gitweb.factorcode.org Git - factor.git/commitdiff
fuel: Incorporate refresh-and-test-all
authortimor <timor.dd@googlemail.com>
Wed, 26 May 2021 18:37:43 +0000 (20:37 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 2 Jun 2021 15:31:35 +0000 (09:31 -0600)
misc/fuel/fuel-listener.el
misc/fuel/fuel-mode.el

index 02ba2e8d52625f8d16c9414ba3aaf21bb2bb0940..3058a0d6961de81e86df856594798c11ed3871e0 100644 (file)
@@ -211,6 +211,16 @@ With prefix, you're teletransported to the listener's buffer."
       (comint-send-string nil " refresh-all \"Done!\" write nl flush\n"))
     (when arg (pop-to-buffer buf))))
 
+(defun fuel-refresh-and-test-all (&optional arg)
+  "Switch to the listener buffer and invokes Factor's refresh-and-test-all.
+With prefix, you're teletransporteded to the listener's buffer."
+  (interactive "P")
+  (let ((buf (process-buffer (fuel-listener--process))))
+    (with-current-buffer buf
+      (comint-send-string nil "\"Refreshing loaded vocabs and running tests...\" write nl flush")
+      (comint-send-string nil " refresh-and-test-all \"Done!\" write nl flush\n"))
+    (when arg (pop-to-buffer buf))))
+
 (defun fuel-test-vocab (&optional arg)
   "Run the unit tests for the current vocabulary. With prefix argument, ask for
 the vocabulary name."
@@ -281,7 +291,8 @@ the vocabulary name."
          fuel-show-callees :enable (symbol-at-point))
         (mode "Autodoc mode" "\C-c\C-a" fuel-autodoc-mode))
   ("Run file" "\C-c\C-k" fuel-run-file)
-  ("Refresh vocabs" "\C-c\C-r" fuel-refresh-all))
+  ("Refresh vocabs" "\C-c\C-r" fuel-refresh-all)
+  ("Refresh vocabs and test" "\C-c\M-r" fuel-refresh-and-test-all))
 
 (define-key fuel-listener-mode-map [menu-bar completion] 'undefined)
 
index 005582f63bd555f44f725244d22324b41f86742a..86c454bbe0699cc2c407bb5db1240636af8a6c91 100644 (file)
@@ -226,6 +226,7 @@ interacting with a factor listener is at your disposal.
   ("Run file" ("\C-c\C-k" "\C-c\C-l" "\C-c\C-e\C-k") fuel-run-file)
   ("Run unit tests" "\C-c\C-t" fuel-test-vocab)
   ("Refresh vocabs" "\C-c\C-r" fuel-refresh-all)
+  ("Refresh vocabs and test" "\C-c\M-r" fuel-refresh-and-test-all)
   --
   (menu "Switch to"
         ("Listener" "\C-c\C-z" run-factor)