branch: externals/wcheck-mode commit 6aa26626ccc6f7f670de092c7d40e44ab8b410f9 Author: Frank Fischer <frank-fisc...@shadow-soft.de> Commit: Frank Fischer <frank-fisc...@shadow-soft.de>
Fix `wcheck--language-exists-p` if executable does not exist The function `executable-find` might return nil if `program` does not exist. In this case `file-regular-p` raises a nil error. We now check for `nil` explicitly. --- wcheck-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcheck-mode.el b/wcheck-mode.el index 6a491b7..69d27bc 100644 --- a/wcheck-mode.el +++ b/wcheck-mode.el @@ -2023,7 +2023,8 @@ a (valid) value for the KEY then query the value from "Return non-nil if PROGRAM is executable regular file." (when (stringp program) (let ((f (executable-find program))) - (and (file-regular-p f) + (and f + (file-regular-p f) (file-executable-p f)))))