diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-04-24 21:46:35 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-04-24 21:46:35 +0300 |
commit | 98c6cfcbe4a07191f73e3bb94ff1f047551533e6 (patch) | |
tree | f7e5ba2903bf6ac345d70cf7106476520ff393c9 /src/treesit.c | |
parent | 8f71c1546dfc70ae7e646834c8d8baf23d4b4d90 (diff) | |
download | emacs-98c6cfcbe4a07191f73e3bb94ff1f047551533e6.tar.gz |
Don't support versioned grammar libraries on MS-Windows
* src/treesit.c (treesit_load_language_push_for_each_suffix):
Don't append ".0.0" on WINDOWSNT.
Diffstat (limited to 'src/treesit.c')
-rw-r--r-- | src/treesit.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/treesit.c b/src/treesit.c index 2d0df10ec44..a2d32770ed8 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -404,7 +404,9 @@ init_treesit_functions (void) static Lisp_Object Vtreesit_str_libtree_sitter; static Lisp_Object Vtreesit_str_tree_sitter; +#ifndef WINDOWSNT static Lisp_Object Vtreesit_str_dot_0; +#endif static Lisp_Object Vtreesit_str_dot; static Lisp_Object Vtreesit_str_question_mark; static Lisp_Object Vtreesit_str_star; @@ -532,15 +534,17 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, FOR_EACH_TAIL (suffixes) { Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes)); - /* Support libraries named with ABI version numbers. In the - foreseeable future we only need to support version 0.0. See - the thread titled "Versioned Tree-sitter parser libraries" on - emacs-devel. */ +#ifndef WINDOWSNT + /* On Posix hosts, support libraries named with ABI version + numbers. In the foreseeable future we only need to support + version 0.0. For more details, see + https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00386.html. */ Lisp_Object candidate2 = concat2 (candidate1, Vtreesit_str_dot_0); Lisp_Object candidate3 = concat2 (candidate2, Vtreesit_str_dot_0); *path_candidates = Fcons (candidate3, *path_candidates); *path_candidates = Fcons (candidate2, *path_candidates); +#endif *path_candidates = Fcons (candidate1, *path_candidates); } } @@ -3595,8 +3599,10 @@ then in the system default locations for dynamic libraries, in that order. */); Vtreesit_str_libtree_sitter = build_pure_c_string ("libtree-sitter-"); staticpro (&Vtreesit_str_tree_sitter); Vtreesit_str_tree_sitter = build_pure_c_string ("tree-sitter-"); +#ifndef WINDOWSNT staticpro (&Vtreesit_str_dot_0); Vtreesit_str_dot_0 = build_pure_c_string (".0"); +#endif staticpro (&Vtreesit_str_dot); Vtreesit_str_dot = build_pure_c_string ("."); staticpro (&Vtreesit_str_question_mark); |