]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure the treesit path variables are lists
authorEli Zaretskii <eliz@gnu.org>
Mon, 17 Oct 2022 17:39:23 +0000 (20:39 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 17 Oct 2022 17:39:23 +0000 (20:39 +0300)
* src/treesit.c: (treesit_load_language)
(treesit_find_override_name): Make sure the lists we use are
really lists.

src/treesit.c

index a2da44b4a7de77e90d80cd91166f9952eae8dbbc..8417b3bb1c529880bac182e7a5b21987aeddf377 100644 (file)
@@ -445,6 +445,7 @@ static bool
 treesit_find_override_name (Lisp_Object language_symbol, Lisp_Object *name,
                            Lisp_Object *c_symbol)
 {
+  CHECK_LIST (Vtreesit_load_name_override_list);
   for (Lisp_Object list = Vtreesit_load_name_override_list;
        !NILP (list); list = XCDR (list))
     {
@@ -489,6 +490,8 @@ treesit_load_language (Lisp_Object language_symbol,
 {
   Lisp_Object symbol_name = Fsymbol_name (language_symbol);
 
+  CHECK_LIST (Vtreesit_extra_load_path);
+
   /* Figure out the library name and C name.  */
   Lisp_Object lib_base_name =
     concat2 (build_pure_c_string ("libtree-sitter-"), symbol_name);