]> gitweb.factorcode.org Git - factor.git/blobdiff - misc/fuel/fuel-listener.el
fuel: Incorporate refresh-and-test-all
[factor.git] / misc / fuel / fuel-listener.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)