mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Fix python-mode when executable is nil
Since executable-find cannot handle a nil argument then doom-modeline-python-executable should not be passed if it is set to nil.
This commit is contained in:
parent
561560dfe5
commit
82654eb6e0
1 changed files with 1 additions and 1 deletions
|
@ -1237,7 +1237,7 @@ See `mode-line-percent-position'.")
|
||||||
;; Versions, support Python, Ruby, Perl and Golang, etc.
|
;; Versions, support Python, Ruby, Perl and Golang, etc.
|
||||||
(add-hook 'python-mode-hook
|
(add-hook 'python-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (and (executable-find doom-modeline-python-executable) (executable-find "cut") (executable-find "sed"))
|
(when (and doom-modeline-python-executable (executable-find doom-modeline-python-executable) (executable-find "cut") (executable-find "sed"))
|
||||||
(setq doom-modeline-env-command (concat doom-modeline-python-executable " --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))))
|
(setq doom-modeline-env-command (concat doom-modeline-python-executable " --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))))
|
||||||
(add-hook 'ruby-mode-hook
|
(add-hook 'ruby-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
Loading…
Reference in a new issue