Skip to content

Commit

Permalink
Check if tuareg-opam--flymake-proc-allowed-file-name-masks is bound
Browse files Browse the repository at this point in the history
* tuareg-opam.el (flymake-proc): Also try to include flymake-proc,
where the variable is defined in.
* tuareg-opam.el (tuareg-opam-mode): Only modify the variable, if it
is non-void.
  • Loading branch information
phikal committed Sep 29, 2023
1 parent 301c80b commit 314bdee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tuareg-opam.el
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ See `prettify-symbols-alist' for more information.")
;;;; Linting

(require 'flymake)
(require 'flymake-proc nil :noerror)

(defalias 'tuareg-opam--flymake-proc-init-create-temp-buffer-copy
(if (fboundp 'flymake-proc-init-create-temp-buffer-copy)
Expand Down Expand Up @@ -317,8 +318,9 @@ characters \\([0-9]+\\)-\\([0-9]+\\): +\\([^\n]*\\)$"
(defvar tuareg-opam--flymake-proc-allowed-file-name-masks)
(defvar tuareg-opam--flymake-proc-err-line-patterns)

(push tuareg-opam--allowed-file-name-masks
tuareg-opam--flymake-proc-allowed-file-name-masks)
(when (boundp 'tuareg-opam--flymake-proc-allowed-file-name-masks)
(push tuareg-opam--allowed-file-name-masks
tuareg-opam--flymake-proc-allowed-file-name-masks))
(setq-local tuareg-opam--flymake-proc-err-line-patterns
tuareg-opam--err-line-patterns)
(when (and tuareg-opam-flymake buffer-file-name)
Expand Down

0 comments on commit 314bdee

Please sign in to comment.