Fix auto major-mode for unsaved buffers