Skip to content

Commit

Permalink
Check executable-find supports optional REMOTE argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
carrete committed Dec 6, 2020
1 parent 4f4439c commit ce3de8b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions flycheck.el
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
;; Declare a bunch of dynamic variables that we need from other modes
(defvar sh-shell) ; For shell script checker predicates
(defvar ess-language) ; For r-lintr predicate
(defvar executable-find) ; For flycheck-executable-find
(defvar markdown-hide-markup) ;
(defvar markdown-fontify-code-block-default-mode) ; For rust-error-explainer
(defvar markdown-fontify-code-blocks-natively) ;
Expand Down Expand Up @@ -517,10 +518,14 @@ and EXECUTABLE contains a directory component, expands to a full
path and tries invoking `executable-find' again."
;; file-name-directory returns non-nil iff the given path has a
;; directory component.
(or
(executable-find executable t)
(when (file-name-directory executable)
(executable-find (expand-file-name executable) t))))
(let ((executable-find-fn #'(lambda (executable)
(if (version< emacs-version "27.1")
(executable-find executable)
(executable-find executable t)))))
(or
(funcall executable-find-fn executable)
(when (file-name-directory executable)
(funcall executable-find-fn (expand-file-name executable))))))

(defcustom flycheck-indication-mode 'left-fringe
"The indication mode for Flycheck errors.
Expand Down

0 comments on commit ce3de8b

Please sign in to comment.