Function: elisp-flymake--byte-compile-done

elisp-flymake--byte-compile-done is a byte-compiled function defined in elisp-mode.el.gz.

Signature

(elisp-flymake--byte-compile-done REPORT-FN SOURCE-BUFFER OUTPUT-BUFFER)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
(defun elisp-flymake--byte-compile-done (report-fn
                                         source-buffer
                                         output-buffer)
  (with-current-buffer
      source-buffer
    (save-excursion
      (save-restriction
        (widen)
        (funcall
         report-fn
         (cl-loop with data =
                  (with-current-buffer output-buffer
                    (goto-char (point-min))
                    (search-forward ":elisp-flymake-output-start")
                    (read (point-marker)))
                  for (string pos _fill level) in data
                  do (goto-char pos)
                  for beg = (if (< (point) (point-max))
                                (point)
                              (line-beginning-position))
                  for end = (min
                             (line-end-position)
                             (or (cdr
                                  (bounds-of-thing-at-point 'sexp))
                                 (point-max)))
                  collect (flymake-make-diagnostic
                           (current-buffer)
                           (if (= beg end)
                               (max (1- beg) (point-min))
                             beg)
                           (if (= beg end)
                               (min (max beg (1+ (point-min)))
                                    (point-max))
                             end)
                           level
                           string)))))))