summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-08-18 12:11:43 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-08-18 12:11:43 -0400
commit5d3c0a067f8e070b6e5eb81ff4e4f6e1bb71be47 (patch)
treebdc6afa9b301cabe578499d338c7d7462fae4c07
parent73b7592be7270ed49724b33716c109aa95cbc2d0 (diff)
downloademacs-5d3c0a067f8e070b6e5eb81ff4e4f6e1bb71be47.tar.gz
* lisp/progmodes/python.el (python-shell-prompt-detect): Remove redundant
executable-find. Fixes: debbugs:18244
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/python.el12
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d2ad52e3b07..53707b23670 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2014-08-18 Stefan Monnier <monnier@iro.umontreal.ca>
+ * progmodes/python.el (python-shell-prompt-detect): Remove redundant
+ executable-find (bug#18244).
+
* simple.el (self-insert-uses-region-functions): Defvar.
2014-08-13 Leo Liu <sdl.web@gmail.com>
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 60121ac6b41..a51cff8529e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1894,7 +1894,7 @@ detection and just returns nil."
(let ((code-file (python-shell--save-temp-file code)))
;; Use `process-file' as it is remote-host friendly.
(process-file
- (executable-find python-shell-interpreter)
+ python-shell-interpreter
code-file
'(t nil)
nil
@@ -2048,11 +2048,14 @@ uniqueness for different types of configurations."
(or python-shell-virtualenv-path "")
(mapconcat #'identity python-shell-exec-path "")))))
-(defun python-shell-parse-command ()
+(defun python-shell-parse-command () ;FIXME: why name it "parse"?
"Calculate the string used to execute the inferior Python process."
+ ;; FIXME: process-environment doesn't seem to be used anywhere within
+ ;; this let.
(let ((process-environment (python-shell-calculate-process-environment))
(exec-path (python-shell-calculate-exec-path)))
(format "%s %s"
+ ;; FIXME: Why executable-find?
(executable-find python-shell-interpreter)
python-shell-interpreter-args)))
@@ -2084,11 +2087,10 @@ uniqueness for different types of configurations."
(defun python-shell-calculate-exec-path ()
"Calculate exec path given `python-shell-virtualenv-path'."
(let ((path (append python-shell-exec-path
- exec-path nil)))
+ exec-path nil))) ;FIXME: Why nil?
(if (not python-shell-virtualenv-path)
path
- (cons (format "%s/bin"
- (directory-file-name python-shell-virtualenv-path))
+ (cons (expand-file-name "bin" python-shell-virtualenv-path)
path))))
(defun python-comint-output-filter-function (output)