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#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties Date: Mon, 6 Feb 2023 04:16:33 +0200 Message-ID: References: <6209c097-0369-828a-7513-d8afb73fd7f0@secure.kjonigsen.net> <11c83963-752c-e4c0-40a0-876b32a08017@yandex.ru> 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="7532"; 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: jostein@kjonigsen.net, 61302@debbugs.gnu.org To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 06 03:17:23 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 1pOr4N-0001lz-81 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Feb 2023 03:17:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOr43-0003TF-VQ; Sun, 05 Feb 2023 21:17:03 -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 1pOr42-0003T4-Lf for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:17:02 -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 1pOr42-0003aD-DQ for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOr42-00046F-3w for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 21:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2023 02:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61302 X-GNU-PR-Package: emacs Original-Received: via spool by 61302-submit@debbugs.gnu.org id=B61302.167564980515731 (code B ref 61302); Mon, 06 Feb 2023 02:17:02 +0000 Original-Received: (at 61302) by debbugs.gnu.org; 6 Feb 2023 02:16:45 +0000 Original-Received: from localhost ([127.0.0.1]:47004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOr3l-00045e-1y for submit@debbugs.gnu.org; Sun, 05 Feb 2023 21:16:45 -0500 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:42608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOr3i-00045Q-6o for 61302@debbugs.gnu.org; Sun, 05 Feb 2023 21:16:43 -0500 Original-Received: by mail-wm1-f47.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so7722338wms.1 for <61302@debbugs.gnu.org>; Sun, 05 Feb 2023 18:16:42 -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=VMQQvsQgdcPznn1oS53rME6++MdlNA4fHYlMcDn8NUo=; b=lWYALnKo7v4yqZ3ba9c20A41eE4TYi2/4kcJ5IlSsTBBcdaMyFx6jckik9TfHe3eyx na2kmu7wVirCkH0VucuOU1EeK4ln+0McxEcIeA5DSoZZovFYm6jBMOCESsCTAG3WBH3W D70OSDD7PY2jxtDkNFOugBWCZArK4x02nmkgNoXYiLpsn0OpD5TgwTBVNKM36tQ+diLc UcSvJpJPxvkZgNxFXd54JVsjH8mSHSaG3DSVJf0y3l2yBKWBk+XdhYzkNRRN7B40hYKr gNk5+L79IygEGAjMZxxFE8H502caqOdQTHzkweDC3I7Cpk+Ngyz7/LlbTpFKGHSiE59I 6weQ== 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=VMQQvsQgdcPznn1oS53rME6++MdlNA4fHYlMcDn8NUo=; b=htd1nEy3gT5fC4ck2iOx2lz2O4yvTlq0urKxMtg//9tqCyky83LLFCOCjzOsCxBFJk C2fud3Gc/quYUCtTTrvxAEwJq+FK/YJrrMrRwkTgyBVT1gUV5fEDe8K2W+enVpfF+5Nu FrC6mzm39SICSnc7VlMprjAIRQCWltBAW6v9puyCYJ71NpbIK8W8vz4zvN3oS96opbq2 20x5zNEsFn5ZhG3uHr762u9QYBCVzC7uHgSDxRUgP+uKsFBi7iLfDThEJbCs5dVOLq6T nUnS9tHlKMp5yYpyy6HAP4ljaw7aRbOX9TiirRkRFJ5lhi8bGfCjkxT80jOvJc8M9Fia 2/wg== X-Gm-Message-State: AO0yUKWLgxchKlQpQq8Wid8X679uDbFO4G1kyjKl3xgr29c8HmjQdvGx tM+35vA1xszqN1dYBYIurSI= X-Google-Smtp-Source: AK7set+UdoMqerteOQGfHxx15hCP6n/VOVn/kWMSqJbsFTklW8GoD9RFG6TKs0mW+vhAwdty/qNjrg== X-Received: by 2002:a05:600c:4586:b0:3de:e447:8025 with SMTP id r6-20020a05600c458600b003dee4478025mr16817382wmo.21.1675649796043; Sun, 05 Feb 2023 18:16:36 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id hg15-20020a05600c538f00b003df7b40f99fsm12425715wmb.11.2023.02.05.18.16.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Feb 2023 18:16:35 -0800 (PST) Content-Language: en-US In-Reply-To: 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:254919 Archived-At: On 06/02/2023 04:06, Randy Taylor wrote: > On Sunday, February 5th, 2023 at 16:56, Dmitry Gutov wrote: >> Hi Randy, >> >> Maybe I was too quick to commit the change. But let's discuss it. > > No, it's fine. You can also see my reply to Jostein. > > BTW thanks for your work on the other modes and sorry for my lack of replies, I've been busy as of late. It's all right. I've kind of gotten into the "flow" in the last few days, so it seems easy to sprinkle minor improvements like that here and there. 'M-x treesit-explorer-mode' helps a lot. >> >> On 05/02/2023 23:30, Randy Taylor wrote: >> >>> That's expected (at least to me) because it's a property. >> >> >> It's both a property and a function, isn't it? > > Sure. But it's still a property, and I wanted them all highlighted the same (or at least the ability to do so). > >> >>> The same >>> applies to c-ts-mode and go-ts-mode as well. >> >> >> Regarding c-ts-mode, it might be a simple oversight, given that >> constructs like >> >> p->handler (it) >> >> >> do not come up very often. But if we take js-ts-mode, for example, where >> a property is often a function, the property name is highlighted as a >> function in a funcall. > > Maybe in c-ts-mode it's not common, but in c++-ts-mode it is and it shares those rules. Sure. >> And speaking of c-ts-mode, this can fix that omission: >> >> diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el >> index 5093c3980b6..3740130be30 100644 >> --- a/lisp/progmodes/c-ts-mode.el >> +++ b/lisp/progmodes/c-ts-mode.el >> @@ -470,7 +470,9 @@ c-ts-mode--font-lock-settings >> :language mode >> :feature 'function >> '((call_expression >> - function: (identifier) @font-lock-function-name-face)) >> + function: >> + [(identifier) @font-lock-function-name-face >> + (field_expression field: (field_identifier) >> @font-lock-function-name-face)])) >> >> :language mode >> :feature 'variable > > Haven't tested it, but the patch looks good to me, thanks. I've pushed it now, thanks for looking.