mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-02 14:53:38 -05:00
refactor(python): string= first, then executable-find
The latter is a little slower depending on the order of $PATH.
This commit is contained in:
@@ -58,8 +58,8 @@
|
|||||||
|
|
||||||
;; Default to Python 3. Prefer the versioned Python binaries since some
|
;; Default to Python 3. Prefer the versioned Python binaries since some
|
||||||
;; systems link the unversioned one to Python 2.
|
;; systems link the unversioned one to Python 2.
|
||||||
(when (and (executable-find "python3")
|
(when (and (string= python-shell-interpreter "python") ; only if unmodified
|
||||||
(string= python-shell-interpreter "python"))
|
(executable-find "python3"))
|
||||||
(setq python-shell-interpreter "python3"))
|
(setq python-shell-interpreter "python3"))
|
||||||
|
|
||||||
(add-hook! 'python-mode-hook
|
(add-hook! 'python-mode-hook
|
||||||
|
Reference in New Issue
Block a user