Let’s Write a Tree-Sitter Major Mode Ah, major modes. There are hundreds of them, and most work in the background, rarely surfacing to tell you what they do or why. They power Emacs, and they grant purpose and verisimilitude to buffers, one of the most important concepts in Emacs. Without major modes – or indeed the buffers that depend on them – you’d be stuck with a rather dumb and basic editor.