diff --git a/lisp/treesit.el b/lisp/treesit.el index 5fe17d5d382..5e60617bce2 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -361,8 +361,9 @@ If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." Use the first parser in the parser list if LANGUAGE is omitted. If LANGUAGE is non-nil, use the first parser for LANGUAGE with TAG in -the parser list. If there's no such parser, return nil. TAG defaults -to nil." +the parser list. TAG defaults to nil. + +If no parser is available, throw `treesit-no-parser'." (let ((parser (or (car (treesit-parser-list nil language tag)) (signal 'treesit-no-parser (list language)))))