Skip to content

Commit

Permalink
Add deprecation warning to virtualenv-workon
Browse files Browse the repository at this point in the history
  • Loading branch information
aculich committed Feb 20, 2014
1 parent 5059f2d commit b3c116e
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions virtualenv.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,16 @@ the virtual environment or if not a string then query the user."
result
default))))))

(let* ((buffer (get-buffer "*Python*"))
(let* ((deprecated
"**WARNING: This virtualenv package has been deprecated!**
Please switch to an alternate package:
pyvenv: https://github.com/jorgenschaefer/pyvenv
virtualenvwrapper: https://github.com/porterjamesj/virtualenvwrapper.el
python-environment: https://github.com/tkf/emacs-python-environment
**WARNING: This virtualenv package has been deprecated!**
")
(buffer (get-buffer "*Python*"))
(kill (or (when buffer
(yes-or-no-p
"Python process already running. Kill? ")))))
Expand Down Expand Up @@ -285,8 +294,9 @@ the virtual environment or if not a string then query the user."
((fboundp 'run-python)
(run-python))
(t (error "Could not start a python shell!"))))
(message (format "Now using virtualenv: %s" env)))
(message "Not changing virtualenv")))))
(message (concat deprecated
(format "Now using virtualenv: %s" env))))
(message (concat deprecated "Not changing virtualenv"))))))

;;;###autoload
(defun virtualenv-deactivate ()
Expand Down

0 comments on commit b3c116e

Please sign in to comment.