summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-01-16 13:26:10 +0100
committerAndrea Corallo <akrl@sdf.org>2021-01-16 13:26:10 +0100
commit0a7ac0b5504e75275699a3d8d2d5d94bcfda8708 (patch)
treebb6158c8a9edeb1e716718abfc98dca16aef9e9e /lisp/progmodes/python.el
parentf1efac1f9efbfa15b6434ebef507c00c1277633f (diff)
parent0732fc31932c75c682c8b65b4dcb4376ca63e8fd (diff)
downloademacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.tar.gz
emacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.tar.bz2
emacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 0965fecfb74..d6c0a4d1dbf 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2027,8 +2027,12 @@ position, else returns nil."
:group 'python
:safe 'stringp)
-(defcustom python-shell-interpreter "python"
+(defcustom python-shell-interpreter
+ (cond ((executable-find "python3") "python3")
+ ((executable-find "python") "python")
+ (t "python3"))
"Default Python interpreter for shell."
+ :version "28.1"
:type 'string
:group 'python)