aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorNoam Postavsky2016-12-09 00:14:48 -0500
committerNoam Postavsky2016-12-09 00:14:48 -0500
commit8f611e5e2309ae3f7f1753f0d2f7a60ca6fc2657 (patch)
tree98d30cadb7d74acc7a939b5bc88687b0ed562d9a /lisp/progmodes/python.el
parent7f106f48e9c35eb75e5f06181e93d481988f8527 (diff)
downloademacs-8f611e5e2309ae3f7f1753f0d2f7a60ca6fc2657.tar.gz
emacs-8f611e5e2309ae3f7f1753f0d2f7a60ca6fc2657.zip
Fix bad quoting of python-shell-interpreter
`python-shell-calculate-command' was using `shell-quote-argument' as if it was generating a shell command, but its callers don't pass the result to a shell, and they expect to parse it with `split-string-and-unquote'. This caused problems depending on the flavor of shell quoting in effect (Bug#25025). * lisp/progmodes/python.el (python-shell-calculate-command): Use `combine-and-quote-strings' to quote the interpreter, so that it can be parsed by `python-shell-make-comint' successfully using `split-string-and-unquote'.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index af8b791a90e..37018122f30 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2379,7 +2379,9 @@ the `buffer-name'."
2379(defun python-shell-calculate-command () 2379(defun python-shell-calculate-command ()
2380 "Calculate the string used to execute the inferior Python process." 2380 "Calculate the string used to execute the inferior Python process."
2381 (format "%s %s" 2381 (format "%s %s"
2382 (shell-quote-argument python-shell-interpreter) 2382 ;; `python-shell-make-comint' expects to be able to
2383 ;; `split-string-and-unquote' the result of this function.
2384 (combine-and-quote-strings (list python-shell-interpreter))
2383 python-shell-interpreter-args)) 2385 python-shell-interpreter-args))
2384 2386
2385(define-obsolete-function-alias 2387(define-obsolete-function-alias