aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Kangas2024-09-26 17:11:56 +0200
committerStefan Kangas2024-09-27 07:01:23 +0200
commit7f0a252f2160dd4d168bc77e2f6e6c9901b67465 (patch)
tree986f2d637773efeae217eb4df5ffb547b24a5dda /lisp/progmodes/python.el
parente776903b31cf2b2d21d91cbc7d6b7dbc1e9d442f (diff)
downloademacs-7f0a252f2160dd4d168bc77e2f6e6c9901b67465.tar.gz
emacs-7f0a252f2160dd4d168bc77e2f6e6c9901b67465.zip
Prefer python3 for python-interpreter
* lisp/progmodes/python.el (python-interpreter): Prefer "python3" when it exists, to be consistent with python-shell-interpreter.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index be76390c680..2b11aaf524e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -312,14 +312,17 @@
312 :version "24.3" 312 :version "24.3"
313 :link '(emacs-commentary-link "python")) 313 :link '(emacs-commentary-link "python"))
314 314
315(defcustom python-interpreter "python" 315(defcustom python-interpreter
316 (cond ((executable-find "python3") "python3")
317 ((executable-find "python") "python")
318 (t "python3"))
316 "Python interpreter for noninteractive use. 319 "Python interpreter for noninteractive use.
317Some Python interpreters also require changes to 320Some Python interpreters also require changes to
318`python-interpreter-args'. 321`python-interpreter-args'.
319 322
320To customize the Python interpreter for interactive use, modify 323To customize the Python interpreter for interactive use, modify
321`python-shell-interpreter' instead." 324`python-shell-interpreter' instead."
322 :version "29.1" 325 :version "30.1"
323 :type 'string) 326 :type 'string)
324 327
325(defcustom python-interpreter-args "" 328(defcustom python-interpreter-args ""