From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#75198: 31.0.50; [treesitter] peculiar error Date: Sun, 05 Jan 2025 09:43:41 +0200 Organization: LINKOV.NET Message-ID: <87h66d9042.fsf@mail.linkov.net> References: <87y0zxmgeu.fsf@akurth.de> <87h66l6opc.fsf@mail.linkov.net> <5123F6E2-519E-42DE-9437-E65D1749D9D4@gmail.com> <87pll2mq7c.fsf@mail.linkov.net> 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="26715"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 75198@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 08:46:30 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tULLC-0006pu-AL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 08:46:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tULKy-0008He-WE; Sun, 05 Jan 2025 02:46:17 -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 1tULKm-0008Gu-8e for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 02:46:13 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tULKk-00087h-Tw for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 02:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=XApzKMJqcmL2LQ/ACSs/jyJWldJnK3A3mv5ZMzMQ++o=; b=gJ7iT8j3KB2w8TJU5c6LBIdE5l4MQfc321Vr1A7pKrKo6hRgom5eeggT/ZjnSS7CI3a9VA/3giL7JR0vjVY2Q6xZ98TfcWxhob3eIKm+YnDSvvizgo2c9xPLSeEmHrHnA2fmMY8bH4q8US1Kq88lT8L6nLrs8Eq0gQg60wR+QpPvPJkXh16QxB05OuucCXUuGv/Dge+ZXtR1ACfJ2S5KJcoHtfYbz01/KNajpidgTXoaBnyAdUGt8SfZ/FpP6nRKG9a4sZqqnork1Fo8QqenCjXsZ5mSyGgRSgVgq3CmbRHl0PcAqxtVoRae+yAK5jWk3Qyd5veDMAK2dBHmtx1WzQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tULKk-00020u-MB for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 02:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75198 X-GNU-PR-Package: emacs Original-Received: via spool by 75198-submit@debbugs.gnu.org id=B75198.17360631247653 (code B ref 75198); Sun, 05 Jan 2025 07:46:02 +0000 Original-Received: (at 75198) by debbugs.gnu.org; 5 Jan 2025 07:45:24 +0000 Original-Received: from localhost ([127.0.0.1]:59622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tULK7-0001zN-NR for submit@debbugs.gnu.org; Sun, 05 Jan 2025 02:45:23 -0500 Original-Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:45275) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tULK4-0001yg-PM for 75198@debbugs.gnu.org; Sun, 05 Jan 2025 02:45:21 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 62DC51C0004; Sun, 5 Jan 2025 07:45:14 +0000 (UTC) In-Reply-To: (Yuan Fu's message of "Sat, 4 Jan 2025 11:22:54 -0800") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298507 Archived-At: >>> It’s better for these functions to check whether the definition of the >>> thing they’re going to use exists or not, before calling >>> treesit-node-match-p; alternatively, if they know they don’t care, >>> they can pass t to IGNORE-MISSING. >> >> Not sure how much this will degrade the performance of >> every function that uses treesit-node-match-p. > > It should be negligible, plus if a function wants to use a thing, it’s > TRT to first check if the thing exists, right? I completely agree. So I fixed 'treesit-show-paren' by adding a check for 'treesit-thing-defined-p'.