compilation-find-buffer

compilation-find-buffer is a compiled Lisp function in `compile.el'.

(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.