Ensure proper mode of *Compile-Log* buffer (bug#67920)
Reported by OGAWA Hirofumi.
* lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings):
Move most of the innards to...
(bytecomp--displaying-warnings): ...this new function, for ease
of maintenance.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Wrap early warning about missing lexbind declaration in
`displaying-byte-compile-warnings` so that it doesn't cause the
creation of a compile-log buffer with the wrong mode.