tex-guess-main-file

tex-guess-main-file is a compiled Lisp function in `tex-mode.el'.

(tex-guess-main-file &optional ALL)

Find a likely `tex-main-file'.
Looks for hints in other buffers in the same directory or in
ALL other buffers. If ALL is `sub' only look at buffers in parent directories
of the current buffer.