 A prefix arg will ask for a env to use which is by default what
 specified in `tox-default-env'."
   (interactive "P")
-  (with-tox current askenvs
+  (with-tox current (or (not tox-default-env) askenvs)
+     (setq tox-default-env toxenvs)
      (unless current
        (error "No function at point"))
      (compile (tox-get-command current toxenvs))))


;; Author: Chmouel Boudjnah <chmouel@chmouel.com>
;; Homepage: https://github.com/chmouel/tox.el
;; Version: 0.2
;; Keywords: convenience, tox, python, tests

;;; Installation:

A prefix arg will ask for a env to use which is by default what
specified in `tox-default-env'."
  (interactive "P")
  (with-tox current (or (not tox-default-env) askenvs)
     (setq tox-default-env toxenvs)            
     (if current
         (let ((current-class (car (split-string current "\\."))))
           (compile (tox-get-command current-class toxenvs)))
       (error "No class at point"))))


