emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117451: * lisp/progmodes/python.el (python-shell


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117451: * lisp/progmodes/python.el (python-shell-prompt-detect): Remove redundant
Date: Mon, 18 Aug 2014 16:11:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117451
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18244
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-08-18 12:11:43 -0400
message:
  * lisp/progmodes/python.el (python-shell-prompt-detect): Remove redundant
  executable-find.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/python.el       python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-08-18 15:20:27 +0000
+++ b/lisp/ChangeLog    2014-08-18 16:11:43 +0000
@@ -1,5 +1,8 @@
 2014-08-18  Stefan Monnier  <address@hidden>
 
+       * 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  <address@hidden>

=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el  2014-07-27 01:36:48 +0000
+++ b/lisp/progmodes/python.el  2014-08-18 16:11:43 +0000
@@ -1894,7 +1894,7 @@
                 (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 @@
             (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 @@
 (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]