Function: flymake--eol-draw-fancy

flymake--eol-draw-fancy is a byte-compiled function defined in flymake.el.gz.

Signature

(flymake--eol-draw-fancy DIAGS SUMMARIZE-FN)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/flymake.el.gz
(defun flymake--eol-draw-fancy (diags summarize-fn)
  (with-temp-buffer
    (cl-loop
     with sorted = (cl-sort diags #'> :key #'flymake-diagnostic-beg)
     for diag in sorted
     for text = (funcall summarize-fn diag)
     for beg = (flymake-diagnostic-beg diag)
     for prev-line-beg-col = nil then line-beg-col
     for line-beg-col =
     (with-current-buffer (flymake-diagnostic-buffer diag)
       (save-excursion (goto-char beg) (1+ (current-column))))
     for height-to-clear = 0 then ret
     for i from 0
     for prev-adjust = 0 then adjust
     for adjust = (+ prev-adjust (if (eql line-beg-col prev-line-beg-col) 0 2))
     for face = `(:foreground
                  ,(face-attribute
                    (or (get-text-property 0 'face text)
                        'flymake-error)
                    :foreground nil t))
     for text-beg-col = (max (- (max 25 (+ line-beg-col 3)) adjust) (+ line-beg-col 1))
     for text-end-col = (max 80 (+ text-beg-col 50))
     for ret = (flymake--eol-draw-fancy-1
                text
                face
                line-beg-col
                height-to-clear
                text-beg-col
                text-end-col))
    (concat " \n" (buffer-string))))