From 82654eb6e0650e09203f7c4b6191050ad330c8bf Mon Sep 17 00:00:00 2001 From: Dror Levin Date: Thu, 15 Nov 2018 11:04:33 +0200 Subject: [PATCH] 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. --- doom-modeline.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doom-modeline.el b/doom-modeline.el index 1eac355..90fc3b0 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -1237,7 +1237,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 ()