Skip to content

Commit

Permalink
Merge pull request #68 from marsam/master
Browse files Browse the repository at this point in the history
Add defvaralias to python.el virtualenv variable
  • Loading branch information
proofit404 committed Feb 19, 2015
2 parents 7f1e0b7 + 73de544 commit 17245c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion anaconda-mode.el
Expand Up @@ -58,11 +58,16 @@
(defvar anaconda-mode-connection nil
"Json Rpc connection to anaconda_mode process.")

(defvaralias 'anaconda-mode-virtualenv-variable (if (version< emacs-version "25.1")
'python-shell-virtualenv-path
'python-shell-virtualenv-root)
"Alias to `python.el' virtualenv variable.")

(defun anaconda-mode-python ()
"Detect python executable."
(let ((python (if (eq system-type 'windows-nt) "pythonw" "python"))
(bin-dir (if (eq system-type 'windows-nt) "Scripts" "bin")))
(--if-let python-shell-virtualenv-path
(--if-let anaconda-mode-virtualenv-variable
(f-join it bin-dir python)
python)))

Expand Down

0 comments on commit 17245c6

Please sign in to comment.