Find the major mode for a buffer.
Group buffers by mode.