Subject: Re: bug#61155: 29.0.60; build failures tree sitter

From: Eli Zaretskii <[email-masked]>
Date: Mon, 30 Jan 2023 15:17:17 +0200

> Cc: [email-masked]
> Date: Mon, 30 Jan 2023 12:40:40 +0100
> From:  Theodor Thornhill via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Can you try this and see if the error goes away?
> 
> thanks,
> Theo
> 
> diff --git a/lisp/treesit.el b/lisp/treesit.el
> index 92833fb007..d7e702bfb8 100644
> --- a/lisp/treesit.el
> +++ b/lisp/treesit.el
> @@ -568,7 +568,7 @@ treesit--font-lock-level-setter
>                res)
>        (let ((buffer (car buffers)))
>          (with-current-buffer buffer
> -          (if (treesit-parser-list)
> +          (if (and (treesit-available-p) (treesit-parser-list))
>                (loop (append res (list buffer)) (cdr buffers))
>              (loop res (cdr buffers))))))))

I fixed this differently, please see the latest emacs-29 branch: I
disabled the loop altogether.

Why would we need to loop over buffers if tree-sitter is not
available?