Subject: bug#59459: 29.0.50; Compilation warnings without tree-sitter

From: Eli Zaretskii <[email-masked]>
Date: Tue, 22 Nov 2022 14:21:08 +0200

> From: Yuan Fu <[email-masked]>
> Date: Mon, 21 Nov 2022 14:01:14 -0800
> 
> [Continuing from bug#59426]
> 
> Those warnings are due to no-tree-sitter build not having functions
> defined in treesit.c. Eli fixed those warnings by adding
> declare-function’s in every file using those functions. Can we make it a
> bit nicer for lisp developers? Maybe defining those functions with
> dummies with something like
> 
> (defun xxx
> (error ’treesit "Tree-sitter not available"))
> 
> ?

I'm not sure this is justified.  The cases where a build lacks a very large
group of primitives references in *.el files are quite rare in our practice;
about the only two examples I know of are xwidgets.el and treesit.el (plus
modes which use tree-sitter).  It's easy enough (albeit annoying) to add a
few declare-function's, so unless we are going to have more and more of
these cases, adding a whole new infrastructure, let alone tricks like the
above, which will raise a lot of brows, sound excessive to me.