From 5a2c1a743b54f7d3355f9b1dc893bbe72e8df6bc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Oct 2022 20:39:23 +0300 Subject: [PATCH] Make sure the treesit path variables are lists * src/treesit.c: (treesit_load_language) (treesit_find_override_name): Make sure the lists we use are really lists. --- src/treesit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/treesit.c b/src/treesit.c index a2da44b4a7d..8417b3bb1c5 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -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); -- 2.39.2