From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter introduction documentation Date: Fri, 16 Dec 2022 19:21:12 +0200 Message-ID: <83y1r7i7sn.fsf@gnu.org> References: <83edszjslp.fsf@gnu.org> <83bko3jr3o.fsf@gnu.org> <87pmcjxrpu.fsf@ledu-giraud.fr> <83zgbni9on.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: manuel@ledu-giraud.fr, joaotavora@gmail.com, emacs-devel@gnu.org To: Perry Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 16 18:21:34 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6EOr-0007d9-Ag for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Dec 2022 18:21:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6EOY-0004jB-7e; Fri, 16 Dec 2022 12:21:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6EOV-0004gW-Fa for emacs-devel@gnu.org; Fri, 16 Dec 2022 12:21:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6EOU-0006m0-SO; Fri, 16 Dec 2022 12:21:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yjNi5074EGKpuPF3wHxl/bnyWD0QF8dkSQnt9LUolyU=; b=gV0m6+t/TZ3QxJkcZQzG X9xaGMC3oiX6Dn2XXEMBGEHpDfmAacaS3KjWjk3hzx8W9irJt3vXGpMsVbywfOPrNbYdrgW2LJr2s pRbCpbbnbOXbp2YLcT0aOzIER2wI7ewUBbWXwg4C95g1XkrR07kWaTQUBtQYO462t/IwheDcyD5yA w1ubCntGHeA8rwBQWO9DT5D/WpzcXIRf5wPX7cPxyTZS7ZurMDDoS48xMQ78ebj27ZcF3nNc8uJaD y8XvXejtm0Z2Kq6Bcdg3oeBrrHNlsqYsMtMP588TT4LOrtfhInJ8aYD9RA6cARvFw4Azv98L3KTsW XiXewWSP5okp/g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6EOU-0002Qj-Bj; Fri, 16 Dec 2022 12:21:10 -0500 In-Reply-To: (message from Perry Smith on Fri, 16 Dec 2022 10:47:32 -0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301510 Archived-At: > From: Perry Smith > Date: Fri, 16 Dec 2022 10:47:32 -0600 > Cc: Manuel Giraud , > João Távora , > emacs-devel > > Am I correct in assuming that the libtree-sitter library is conditionally > loaded so Emacs could be built with tree-sitter and distributed but if > the end user’s machine does not have libtree-sitter, Emacs will still > load but (treesit-available-p) will return false? That is correct for the language grammar libraries, but not for the tree-sitter library itself. Emacs can be built either with or without the tree-sitter library, just like we do with libpng and other optional image libraries. If Emacs was build with the tree-sitter library, then it will attempt to load the language grammar libraries (whcih are separate libraries) dynamically when the corresponding language mode is activated.