emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/wcheck-mode 6aa2662 24/39: Fix `wcheck--language-exists


From: Teemu Likonen
Subject: [elpa] externals/wcheck-mode 6aa2662 24/39: Fix `wcheck--language-exists-p` if executable does not exist
Date: Sun, 4 Oct 2020 07:55:21 -0400 (EDT)

branch: externals/wcheck-mode
commit 6aa26626ccc6f7f670de092c7d40e44ab8b410f9
Author: Frank Fischer <frank-fischer@shadow-soft.de>
Commit: Frank Fischer <frank-fischer@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)))))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]