diff options
| author | Yuan Fu | 2025-01-17 17:26:23 -0800 |
|---|---|---|
| committer | Yuan Fu | 2025-01-17 17:27:23 -0800 |
| commit | 197d09a5fa9e94a09b7569a42480253138a5b2fd (patch) | |
| tree | 6c3d237da2bb195857a4f108fcccf894a1f2451f /src | |
| parent | e3b9de03e641cef5daeada4912fa711470697ba3 (diff) | |
| download | emacs-197d09a5fa9e94a09b7569a42480253138a5b2fd.tar.gz emacs-197d09a5fa9e94a09b7569a42480253138a5b2fd.zip | |
Remap language symbol in treesit-query-compile (bug#72388)
* src/treesit.c (Ftreesit_query_compile): Use remapped language.
Diffstat (limited to 'src')
| -rw-r--r-- | src/treesit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/treesit.c b/src/treesit.c index 0d878a580eb..5de75219907 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -3081,6 +3081,9 @@ You can use `treesit-query-validate' to validate and debug a query. */) | |||
| 3081 | wrong_type_argument (Qtreesit_query_p, query); | 3081 | wrong_type_argument (Qtreesit_query_p, query); |
| 3082 | CHECK_SYMBOL (language); | 3082 | CHECK_SYMBOL (language); |
| 3083 | 3083 | ||
| 3084 | Lisp_Object remapped_lang = resolve_language_symbol (language); | ||
| 3085 | CHECK_SYMBOL (remapped_lang); | ||
| 3086 | |||
| 3084 | treesit_initialize (); | 3087 | treesit_initialize (); |
| 3085 | 3088 | ||
| 3086 | if (TS_COMPILED_QUERY_P (query)) | 3089 | if (TS_COMPILED_QUERY_P (query)) |
| @@ -3091,7 +3094,7 @@ You can use `treesit-query-validate' to validate and debug a query. */) | |||
| 3091 | return query; | 3094 | return query; |
| 3092 | } | 3095 | } |
| 3093 | 3096 | ||
| 3094 | Lisp_Object lisp_query = make_treesit_query (query, language); | 3097 | Lisp_Object lisp_query = make_treesit_query (query, remapped_lang); |
| 3095 | 3098 | ||
| 3096 | /* Maybe actually compile. */ | 3099 | /* Maybe actually compile. */ |
| 3097 | if (NILP (eager)) | 3100 | if (NILP (eager)) |