Function: compilation-loop
compilation-loop is a macro defined in compile.el.gz.
Signature
(compilation-loop < PROPERTY-CHANGE 1+ ERROR LIMIT)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
(defmacro compilation-loop (< property-change 1+ error limit)
`(let (opt)
(while (,< n 0)
(setq opt pt)
(or (setq pt (,property-change pt 'compilation-message))
;; Handle the case where the first error message is
;; at the start of the buffer, and n < 0.
(if (or (eq (get-text-property ,limit 'compilation-message)
(get-text-property opt 'compilation-message))
(eq pt opt))
(user-error ,error compilation-error)
(setq pt ,limit)))
;; prop 'compilation-message usually has 2 changes, on and off, so
;; re-search if off
(or (setq msg (get-text-property pt 'compilation-message))
(if (setq pt (,property-change pt 'compilation-message nil ,limit))
(setq msg (get-text-property pt 'compilation-message)))
(user-error ,error compilation-error))
(or (< (compilation--message->type msg) compilation-skip-threshold)
(if different-file
(eq (prog1 last
(setq last (compilation--loc->file-struct
(compilation--message->loc msg))))
last))
(if compilation-skip-visited
(compilation--loc->visited (compilation--message->loc msg)))
(if compilation-skip-to-next-location
(eq (compilation--message->loc msg) loc))
;; count this message only if none of the above are true
(setq n (,1+ n))))))