diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-04-25 09:57:23 -0400 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-04-25 09:57:23 -0400 |
commit | 095ec506d03b76155b399fd7b23554279b2cfee0 (patch) | |
tree | 19d842d92c57cf863e69858bb85e0c1c311c4308 /src/treesit.c | |
parent | f55ac7a74510d68f02d17a034571350f9876017f (diff) | |
parent | 524e161a536c1c803f453f286430ba1a4e36694e (diff) | |
download | emacs-095ec506d03b76155b399fd7b23554279b2cfee0.tar.gz |
Merge from origin/emacs-29
524e161a536 Followup to addition of TUTORIAL.fa
76f50df1539 Add Farsi/Persian translation of the tutorial
8eacfaea6d8 Add Mongolian language environments
fe8efbb8f75 Document the 'end-session' event on MS-Windows
d80f959bede Update to Org 9.6.4-9-g8eb209
98c6cfcbe4a Don't support versioned grammar libraries on MS-Windows
8f71c1546df Accept versioned tree-sitter language grammar files
99add09d5e1 tab-bar-new-tab: inhibit side-window checks
087e8181947 * etc/NEWS: Fix outline level. (Bug#63042)
d7f38558c4c ; Improve font selection for Traditional Mongolian
965c5e0231c Fix rendering of Traditional Mongolian script
9a0f10b5f88 Fix line-number-at-pos when POSITION is out of narrowing
4e0f4292aaf ; * etc/tutorials/TUTORIAL: Fix punctuation.
dec2ac0c657 Fix exiting Emacs after saving a tutorial
# Conflicts:
# etc/NEWS
Diffstat (limited to 'src/treesit.c')
-rw-r--r-- | src/treesit.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/treesit.c b/src/treesit.c index cbcc688571b..ef272fb8871 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -404,6 +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; @@ -543,8 +546,21 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, suffixes = Vdynamic_library_suffixes; FOR_EACH_TAIL (suffixes) - *path_candidates = Fcons (concat2 (lib_base_name, XCAR (suffixes)), - *path_candidates); + { + Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes)); +#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); + } } /* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer @@ -3948,6 +3964,10 @@ the symbol of that THING. For example, (or block sexp). */); 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); |