>> Actually, it's not a new command, but a new function for C-M- >> via forward-sexp-function. > > It's an interactive function, so it's a command. > >> When a ts-mode defines the 'sexp-list' thing, only then it's used. >> Otherwise the current implementation with 'sexp' is used for C-M-. > > Then why is the new function interactive? Ah, I didn't notice it's interactive! treesit-forward-sexp-list was based on treesit-forward-sexp that has the interactive spec added by Theo in the commit 207901457c01. I guess that Theo decided to make this function interactive for such use case that users could use it separately or bind it to a key. What really needs to be interactive is the new function treesit-forward-list added in the following patch because there is no special variable forward-list-function for forward-list like there is forward-sexp-function for forward-sexp. So users might want to use it separately: