Merge pull request #45 from drrlvn/patch-1

Fix python-mode when executable is nil
This commit is contained in:
Vincent Zhang 2018-11-15 22:38:05 +08:00 committed by GitHub
commit 6c151e7535
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1241,7 +1241,7 @@ See `mode-line-percent-position'.")
;; Versions, support Python, Ruby, Perl and Golang, etc.
(add-hook 'python-mode-hook
(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'")))))
(add-hook 'ruby-mode-hook
(lambda ()