diff options
| author | Stefan Kangas | 2024-09-26 17:11:56 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2024-09-27 07:01:23 +0200 |
| commit | 7f0a252f2160dd4d168bc77e2f6e6c9901b67465 (patch) | |
| tree | 986f2d637773efeae217eb4df5ffb547b24a5dda /lisp/progmodes/python.el | |
| parent | e776903b31cf2b2d21d91cbc7d6b7dbc1e9d442f (diff) | |
| download | emacs-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.el | 7 |
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. |
| 317 | Some Python interpreters also require changes to | 320 | Some Python interpreters also require changes to |
| 318 | `python-interpreter-args'. | 321 | `python-interpreter-args'. |
| 319 | 322 | ||
| 320 | To customize the Python interpreter for interactive use, modify | 323 | To 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 "" |