>>> I can't find any code out there that seems to care what is its default >>> value (all users set it but doesn't look at it, AFAICT). >> >> This case looks problematic: >> >> ;; LANG can be nil. We don't want to use the fallback >> ;; in `treesit-language-at', so here we call >> ;; `treesit-language-at-point-function' directly. >> (let* ((lang (and treesit-language-at-point-function >> (funcall treesit-language-at-point-function >> pos))) > > Ah, indeed you're right. > >> But I believe this whole 'let*' can be replaced by just >> the 'treesit-parsers-at' call. I hope Yuan could confirm this. > > [ Not familiar enough with this code, so I'll let Yuan chime in. ] Yuan, please confirm whether the reference to 'treesit-language-at-point-function' can be removed from 'treesit-node-at' this way: