diff --git a/misc/fuel/fuel-listener.el b/misc/fuel/fuel-listener.el index d5fec4bf5f..485d97e81f 100644 --- a/misc/fuel/fuel-listener.el +++ b/misc/fuel/fuel-listener.el @@ -192,12 +192,15 @@ With prefix, you're teletransported to the listener's buffer." (comint-send-string nil "\"Refreshing loaded vocabs...\" write nl flush") (comint-send-string nil " refresh-all \"Done!\" write nl flush\n"))) -(defun fuel-test-vocab (vocab) - "Run the unit tests for the specified vocabulary." - (interactive (list (fuel-completion--read-vocab nil (fuel-syntax--current-vocab)))) - (comint-send-string (fuel-listener--process) - (concat "\"" vocab "\" reload nl flush\n" - "\"" vocab "\" test nl flush\n"))) +(defun fuel-test-vocab (&optional arg) + "Run the unit tests for the current vocabulary. With prefix argument, ask for +the vocabulary name." + (interactive "P") + (let* ((vocab (or (and (not arg) (fuel-syntax--current-vocab)) + (fuel-completion--read-vocab nil)))) + (comint-send-string (fuel-listener--process) + (concat "\"" vocab "\" reload nl flush\n" + "\"" vocab "\" test nl flush\n")))) ;;; Completion support