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: `M-q' uses tree-sitter now? Date: Sun, 18 Dec 2022 19:16:57 +0200 Message-ID: <838rj4fx86.fsf@gnu.org> References: <5B81ABF1-29FA-4624-A091-533363344CF1@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18554"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, eduardoochs@gmail.com To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 18 18:17:10 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 1p6xHi-0004as-8m for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Dec 2022 18:17:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6xHO-0000YE-Ui; Sun, 18 Dec 2022 12:16:50 -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 1p6xHN-0000Vy-D8 for emacs-devel@gnu.org; Sun, 18 Dec 2022 12:16:49 -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 1p6xHM-0002hH-Nh; Sun, 18 Dec 2022 12:16:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+u8PhjKdTeyogT1BgxOsshG8D4CabeztbtBLh8SyKmU=; b=kOMqwwU+H8EW ZLg0Z30rxaEKAWW+SRcc2qavB+s6JttL5dZc66DkyCyHm+SoQBaj8qDT1gNdUQGMsGZEeUSzwW1qC ey/8IqAnRHRx0fcZ05Wz7WBjlmfE0yGbLa9/X249jRK8zKdKr8K52VUvPMn2y/DyRkYyYzc+hMG2x G+jfiUhNeIHMn/P6ZvHcLFQOeD3ptXD53yOr15gE/NwzzsWXTJmP6cQ/WlGnvy/DL9tT8znkRKz3Y Vyw24gQOcjULTZVu25JXQJysJiGvMdBk4qnuho+W9o9XiGeVk+tJ1sEmzMTPMT+IxcuILKXzSwTSb +Z8IO5iui/UWjRge1WXlLw==; 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 1p6xHM-0005nN-7W; Sun, 18 Dec 2022 12:16:48 -0500 In-Reply-To: <5B81ABF1-29FA-4624-A091-533363344CF1@thornhill.no> (message from Theodor Thornhill on Sun, 18 Dec 2022 15:53:29 +0100) 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:301614 Archived-At: > Date: Sun, 18 Dec 2022 15:53:29 +0100 > From: Theodor Thornhill > > Strange. Shouldn't it be enough to put the require in the eval-when-compile? Is anything else needed for the function to be picked up? His Emacs was built without tree-sitter, would be my guess. We need to call treesit-available-p when this can happen, before calling any treesit functions that might not be fboundp.