From b1ac80c7b2248e621ee62d32a6a7f648944a9e07 Mon Sep 17 00:00:00 2001 From: Erik Charlebois Date: Sun, 21 Feb 2010 03:35:15 -0800 Subject: [PATCH] FUEL: Add prefix key behavior to fuel-test-vocab so that it is similar to other FUEL interactive functions. --- misc/fuel/fuel-listener.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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