Skip to content

Commit

Permalink
Update flymake version and flymake-rest-change-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mohkale committed Jan 8, 2022
1 parent 2caa109 commit 64871ef
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
40 changes: 21 additions & 19 deletions flymake-rest-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,27 @@
(require 'flymake-rest-hook)

(defun flymake-rest-change-checker--cands (all-modes)
(cl-remove-duplicates
(cl-loop for (mode . checkers) in
(if all-modes
flymake-rest-config
(list (assoc major-mode flymake-rest-config)))
append
(cl-loop for it in checkers
with checker = nil
do (setq checker (if (symbolp it)
it
(car it)))
with exists = nil
do (setq exists (or (member checker flymake-diagnostic-functions)
(when-let ((state (gethash checker flymake--backend-state)))
(not (flymake--backend-state-disabled state)))))
when checker
collect (list (symbol-name checker)
mode checker exists)))
:test (lambda (a b) (string-equal (car a) (car b)))))
"Candidates for `flymake-rest-change-checker'.
With ALL-MODES fetch all registered flymake checkers even when
they aren't associated with the current mode."
(let ((configured-checkers (flymake--collect #'identity)))
(cl-remove-duplicates
(cl-loop for (mode . checkers) in
(if all-modes
flymake-rest-config
(list (assoc major-mode flymake-rest-config)))
append
(cl-loop for it in checkers
with checker = nil
do (setq checker (if (symbolp it)
it
(car it)))
with exists = nil
do (setq exists (member checker configured-checkers))
when checker
collect (list (symbol-name checker)
mode checker exists)))
:test (lambda (a b) (string-equal (car a) (car b))))))

(defun flymake-rest-change-checker--read-checkers (&optional all-modes)
(let* ((cands (flymake-rest-change-checker--cands all-modes))
Expand Down
2 changes: 1 addition & 1 deletion flymake-rest.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;; Created: 15 June 2021
;; Homepage: https://github.com/mohkale/flymake-rest
;; Keywords: language tools
;; Package-Requires: ((emacs "27.1") (let-alist "1.0"))
;; Package-Requires: ((emacs "28.1") (let-alist "1.0") (flymake-rest "1.2.1))
;; SPDX-License-Identifier: MIT
;; Version: 1.0.0

Expand Down

0 comments on commit 64871ef

Please sign in to comment.