From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61205: 'function' in 3rd element of treesit-font-lock-feature-list Date: Fri, 3 Feb 2023 17:15:05 +0200 Message-ID: References: <837cwzw8j1.fsf@gnu.org> <1b8044bd-6855-fdc7-697d-70322a8349c0@yandex.ru> <83k00zuejn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4163"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 61205@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, dev@rjt.dev To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 03 16:16:47 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 1pNxny-0000wY-RZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Feb 2023 16:16:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNxnO-00050C-I4; Fri, 03 Feb 2023 10:16:10 -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 1pNxnH-0004y0-OK for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 10:16:03 -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 1pNxnG-0002zR-CW for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 10:16:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNxnF-0002rV-RI for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 10:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Feb 2023 15:16:01 +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.167543731510947 (code B ref 61205); Fri, 03 Feb 2023 15:16:01 +0000 Original-Received: (at 61205) by debbugs.gnu.org; 3 Feb 2023 15:15:15 +0000 Original-Received: from localhost ([127.0.0.1]:39763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxmV-0002qU-AO for submit@debbugs.gnu.org; Fri, 03 Feb 2023 10:15:15 -0500 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:46923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxmT-0002qB-Ox for 61205@debbugs.gnu.org; Fri, 03 Feb 2023 10:15:14 -0500 Original-Received: by mail-ej1-f47.google.com with SMTP id p26so16098787ejx.13 for <61205@debbugs.gnu.org>; Fri, 03 Feb 2023 07:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=oJmccHivm2qnGzf++SSBBjCJ5NrlEQA9gQzZs5PAC4c=; b=dPNh6WtnGzbOQl2lyYZCu77tFs6c7wj4wM0k6vSyY8SIj8mMqnWStUyE2Kkpi/Iqfo 76Ej8SB4wlpCL6dIRAvlh8hbOL5FtJwESKhZ4zWjMCneTBWuJ5mKNnRLbK20hpu1FhXO Y/IQh6x3FCgMNACsOZxHKJhBmYOsCtpl+NfMSQih3RmceCIU6y76kNIZ6HrkQvYlrvgY eXXBsWj6s94C/jTQCT0pkmFNQF6FP9rUBtd+KTSlgKGQe1o2f3mjBm57TwB+JmQbkrSz SWUZnNKmBejaeTmWUOpgf4K+fUseYDQWi8ppjhf0L7pH0RLlGFKVqY+3wcHVx8agkpEE drfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oJmccHivm2qnGzf++SSBBjCJ5NrlEQA9gQzZs5PAC4c=; b=APzeyBy+thaT5AqoofE4/X4GkZAnAzkwRVeX33SE3G9JcbMzjpmLPFRUppl5lHIFbk Eeophf9Oo7WpQhIgaHoZqR6G/hmrUd9Wp+eop4hg8JYKGuNSTzoCCyY7nq6ThQR0XIib qbUiEsQzhxghVlANfLg5f93Ys9U0ayccOIwjyQ/H2CcD/PZb2ILSgRM87+kOrI7K/jzz VfX1dCjvli5R6F7dK1rGdgQCwvEMbmyyV+Du/DtCH9jLzq7jTnLb+kPezB0fcmF9bcm7 fCv2KB8TM65wXqSkDY9iqrnSyM4yjrmDRFOtQNDhsu3CX87tcfoKQw+bdqe8LjB8uEpI UdLQ== X-Gm-Message-State: AO0yUKV4N8mvisL1Eeh/YgDoj9kbNZKXbeHdd4hAEABCKrXrfMQfVJw2 01tTu7xsfGfdS2rUO1InZdo= X-Google-Smtp-Source: AK7set/3DIz/W7zaPN6ULw6qlFY17iMJxvSE3n0xrDaEn0ZvBx16QIAkyw5Qlw62kbnPddr7VMOatQ== X-Received: by 2002:a17:906:99cd:b0:88f:79e7:830d with SMTP id s13-20020a17090699cd00b0088f79e7830dmr5738134ejn.67.1675437307743; Fri, 03 Feb 2023 07:15:07 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a27-20020a170906275b00b0086edf177209sm1514006ejd.78.2023.02.03.07.15.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Feb 2023 07:15:07 -0800 (PST) Content-Language: en-US In-Reply-To: <83k00zuejn.fsf@gnu.org> 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:254733 Archived-At: On 03/02/2023 14:19, Eli Zaretskii wrote: >> 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. Consistency is what I'm after here. c-ts-mode, as well as go-ts-mode, rust-ts-mode and typescript-ts-mode, all previously mentioned in this report, currently put it at 3. The rest put it as 4, or don't use it at all. Maybe we'll move them to level 3 for the next release; I think to do that, we will have to define separate faces first (for function calls and maybe variable references, as soon as we manage to find them in a smart way), so that the users will be able to make sure definitions are distinct from usages. > 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. Okay.