aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2021-01-10 15:48:57 +0100
committerLars Ingebrigtsen2021-01-10 15:48:57 +0100
commitfa686f099800aac22dcdc39fb84ee2dcca8ffbf4 (patch)
tree62205e2c5bdf03c8e9cde73921d9b4556d229ec6
parent6858b74763cd784e4594b329633ac39c599c686d (diff)
downloademacs-fa686f099800aac22dcdc39fb84ee2dcca8ffbf4.tar.gz
emacs-fa686f099800aac22dcdc39fb84ee2dcca8ffbf4.zip
Default python-shell-interpreter to python3
* lisp/progmodes/python.el (python-shell-interpreter): Default to python3 (bug#45655).
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/progmodes/python.el6
2 files changed, 7 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d655955ae20..13ef7d8371a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -347,6 +347,8 @@ is set to nil, this message is inhibited.
347 347
348** Python mode 348** Python mode
349 349
350*** 'python-shell-interpreter' now defaults to python3 on systems with python3.
351
350*** 'C-c C-r' can now be used on arbitrary regions. 352*** 'C-c C-r' can now be used on arbitrary regions.
351The command previously extended the start of the region to the start 353The command previously extended the start of the region to the start
352of the line, but will now actually send the marked region, as 354of the line, but will now actually send the marked region, as
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."
2027 :group 'python 2027 :group 'python
2028 :safe 'stringp) 2028 :safe 'stringp)
2029 2029
2030(defcustom python-shell-interpreter "python" 2030(defcustom python-shell-interpreter
2031 (cond ((executable-find "python3") "python3")
2032 ((executable-find "python") "python")
2033 (t "python3"))
2031 "Default Python interpreter for shell." 2034 "Default Python interpreter for shell."
2035 :version "28.1"
2032 :type 'string 2036 :type 'string
2033 :group 'python) 2037 :group 'python)
2034 2038