Function: flymake--collect

flymake--collect is a byte-compiled function defined in flymake.el.gz.

Signature

(flymake--collect FN &optional MESSAGE-PREFIX)

Documentation

Collect Flymake backends matching FN.

If MESSAGE-PREFIX, echo a message using that prefix.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/flymake.el.gz
(defun flymake--collect (fn &optional message-prefix)
  "Collect Flymake backends matching FN.
If MESSAGE-PREFIX, echo a message using that prefix."
  (unless flymake--state
    (user-error "Flymake is not initialized"))
  (let (retval)
    (maphash (lambda (backend state)
               (when (funcall fn state) (push backend retval)))
             flymake--state)
    (when message-prefix
      (message "%s%s"
               message-prefix
               (mapconcat (lambda (s) (format "%s" s))
                          retval ", ")))
    retval))