Function: compilation-find-buffer
compilation-find-buffer is a byte-compiled function defined in
compile.el.gz.
Signature
(compilation-find-buffer &optional AVOID-CURRENT)
Documentation
Return a compilation buffer.
If AVOID-CURRENT is nil, and the current buffer is a compilation buffer, return it. If AVOID-CURRENT is non-nil, return the current buffer only as a last resort.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
;; This is mostly unused, but we keep it for the sake of some external
;; packages which seem to make use of it.
(defun compilation-find-buffer (&optional avoid-current)
"Return a compilation buffer.
If AVOID-CURRENT is nil, and the current buffer is a compilation buffer,
return it. If AVOID-CURRENT is non-nil, return the current buffer only
as a last resort."
(if (and (compilation-buffer-internal-p) (not avoid-current))
(current-buffer)
(next-error-find-buffer avoid-current 'compilation-buffer-internal-p)))