Function: compilation-auto-jump
compilation-auto-jump is a byte-compiled function defined in
compile.el.gz.
Signature
(compilation-auto-jump BUFFER POS)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
(defun compilation-auto-jump (buffer pos)
(when (buffer-live-p buffer)
(with-current-buffer buffer
(goto-char pos)
(let ((win (get-buffer-window buffer 0)))
(if win (set-window-point win pos)))
(when compilation-auto-jump-to-first-error
(cl-case compilation-auto-jump-to-first-error
(if-location-known
(when (compilation--file-known-p)
(compile-goto-error)))
(first-known
(let (match)
(while (and (not (compilation--file-known-p))
(setq match (text-property-search-forward
'compilation-message nil nil t)))
(goto-char (prop-match-beginning match))))
(when (compilation--file-known-p)
(compile-goto-error)))
(otherwise
(compile-goto-error)))))))