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.bugs Subject: bug#61205: 'function' in 3rd element of treesit-font-lock-feature-list Date: Fri, 03 Feb 2023 14:19:40 +0200 Message-ID: <83k00zuejn.fsf@gnu.org> References: <837cwzw8j1.fsf@gnu.org> <1b8044bd-6855-fdc7-697d-70322a8349c0@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21004"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61205@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, dev@rjt.dev To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 03 13:31:04 2023 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 1pNvDc-00053B-Ce for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Feb 2023 13:31:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNv2z-0005kw-0o; Fri, 03 Feb 2023 07:20:05 -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 1pNv2x-0005ke-OH for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 07:20:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNv2x-00061I-D8 for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 07:20:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNv2x-0001K5-9H for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 07:20:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Feb 2023 12:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61205 X-GNU-PR-Package: emacs Original-Received: via spool by 61205-submit@debbugs.gnu.org id=B61205.16754267865012 (code B ref 61205); Fri, 03 Feb 2023 12:20:03 +0000 Original-Received: (at 61205) by debbugs.gnu.org; 3 Feb 2023 12:19:46 +0000 Original-Received: from localhost ([127.0.0.1]:36667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNv2f-0001Im-OF for submit@debbugs.gnu.org; Fri, 03 Feb 2023 07:19:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNv2d-0001IZ-13 for 61205@debbugs.gnu.org; Fri, 03 Feb 2023 07:19:44 -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 1pNv2X-0005rL-Dp; Fri, 03 Feb 2023 07:19:37 -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=i99ALY4ZM8SbeZqdHxHRIWOBrCrqJTSyhG77CB0/kCs=; b=YNXl9/ooVkbe CFbH+uTcrgOTfz3ttdd1hlk9ew6Fw7DfG4H7QW2kmONoCbiUgd1NWWVCUcjt7uFleVyl6c5vLP6Zw Hc4hu+ccNbIG6/FdKt98KvFBGsTpCenJJfZu+5EIMMj0J/CXv5G54gImDoswUGKNjSMeFpgI7tZ37 9YUOS79J/GgCmBa+QCVc1xjRSAOkwzqiaeaXNnVZBxdnNU0vaPjN9HqbvTUJiVpwgOyrXLIwS5Cq8 XjCH01Q+k8yFrAva5F2jfu5rzIfrzi1s0lmD7CeN8SH6Vdahy3FKNtIii14XXU6NHQP9SfPGbwdYp utBKgjpWv/9CxhgbfUWfKQ==; 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 1pNv2W-0001Wx-Di; Fri, 03 Feb 2023 07:19:36 -0500 In-Reply-To: <1b8044bd-6855-fdc7-697d-70322a8349c0@yandex.ru> (message from Dmitry Gutov on Fri, 3 Feb 2023 13:42:51 +0200) 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:254730 Archived-At: > Date: Fri, 3 Feb 2023 13:42:51 +0200 > Cc: 61205@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, dev@rjt.dev > From: Dmitry Gutov > > On 03/02/2023 08:46, Eli Zaretskii wrote: > >> Cc:61205@debbugs.gnu.org, Theodor Thornhill, > >> randy taylor > >> Date: Thu, 2 Feb 2023 22:25:47 +0200 > >> From: Dmitry Gutov > >> > >> On a related note: 'property' is in level 3 in c-ts-mode. > >> > >> Should it to go level 4? > >> > >> Also in typescript-ts-mode. > > What is 'property' in those modes? In c-ts-mode, is 'property' the > > name of a struct or enum member, as in foo.bar? Or is it something > > else? > > It's the 'bar' in 'foo.bar', yes. Specifically in the cases where it's > being looked up, rather than defined (in a type definition). Examples: > > it2.lnum_pixel_width = it.lnum_pixel_width; > > || (it.bidi_p && it.bidi_it.scan_dir == -1 > > 'lnum_pixel_width', 'bidi_p', 'bidi_it' and 'scan_dir' are highlighted > with font-lock-property-face. You can see it for yourself by trying > c-ts-mode in any of our files. Then as far as I'm concerned, this can go to level 4, but it must be done consistently across all the *-ts modes. So if some mode wants 'property' to be highlighted, and wants it badly, we should IMO keep it in C as well. In any case, please make this consistent across all the relevant modes, and don't forget adjusting the documentation of treesit-font-lock-level accordingly as needed.