Remap language symbol in treesit-query-compile (bug#72388)
* src/treesit.c (Ftreesit_query_compile): Use remapped language.
This commit is contained in:
parent
e3b9de03e6
commit
197d09a5fa
1 changed files with 4 additions and 1 deletions
|
@ -3081,6 +3081,9 @@ You can use `treesit-query-validate' to validate and debug a query. */)
|
|||
wrong_type_argument (Qtreesit_query_p, query);
|
||||
CHECK_SYMBOL (language);
|
||||
|
||||
Lisp_Object remapped_lang = resolve_language_symbol (language);
|
||||
CHECK_SYMBOL (remapped_lang);
|
||||
|
||||
treesit_initialize ();
|
||||
|
||||
if (TS_COMPILED_QUERY_P (query))
|
||||
|
@ -3091,7 +3094,7 @@ You can use `treesit-query-validate' to validate and debug a query. */)
|
|||
return query;
|
||||
}
|
||||
|
||||
Lisp_Object lisp_query = make_treesit_query (query, language);
|
||||
Lisp_Object lisp_query = make_treesit_query (query, remapped_lang);
|
||||
|
||||
/* Maybe actually compile. */
|
||||
if (NILP (eager))
|
||||
|
|
Loading…
Add table
Reference in a new issue