From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#59897: 29.0.60; csharp-ts-mode: variable-name fontified as method when invoking method with generic type-argument. Date: Fri, 9 Dec 2022 13:07:28 -0800 Message-ID: References: <76edd79f-6da1-4c28-b20e-5eb4d9a819b2@app.fastmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11550"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jostein@kjonigsen.net, theo@thornhill.no, 59897@debbugs.gnu.org To: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 09 22:08:08 2022 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 1p3kbH-0002o1-RZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Dec 2022 22:08:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3kbC-00028w-TU; Fri, 09 Dec 2022 16:08:02 -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 1p3kbC-00028o-6S for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 16:08: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 1p3kbB-0008KY-UP for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 16:08:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3kbB-0005gL-Jo for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 16:08:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <76edd79f-6da1-4c28-b20e-5eb4d9a819b2@app.fastmail.com> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2022 21:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59897 X-GNU-PR-Package: emacs Original-Received: via spool by 59897-submit@debbugs.gnu.org id=B59897.167062005921829 (code B ref 59897); Fri, 09 Dec 2022 21:08:01 +0000 Original-Received: (at 59897) by debbugs.gnu.org; 9 Dec 2022 21:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:38512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3kap-0005g1-0j for submit@debbugs.gnu.org; Fri, 09 Dec 2022 16:07:39 -0500 Original-Received: from mail-pj1-f44.google.com ([209.85.216.44]:56242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3kam-0005ft-3D for 59897@debbugs.gnu.org; Fri, 09 Dec 2022 16:07:37 -0500 Original-Received: by mail-pj1-f44.google.com with SMTP id u5so6019982pjy.5 for <59897@debbugs.gnu.org>; Fri, 09 Dec 2022 13:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=JsV8AWyX8acUS6WHQpB/l/52RmHryH1nT2n4AQxjNFw=; b=VZRSvjw9i3VJDgeJI2ZaqRnZRDX0cWMSHD+BzbgB2aXERopkR+3Tov7oRNkaX5UFJz dA3HmQf/p7t6TOM9FxoQLnGmbvZqCM8/G+yKO25ydo3S9lei+l4Ezsk+6HJBL8HVD293 TyObr3aG1cP2p7zw5A5Q/eCGRP/AFCtsQlduqn2xzhksdHpFhvQIDa2sBg0e5CcTKZO7 CPhoZT4Whf+cyF516ex6K9kSj/Ffac5VVrtgfsud/6QOZYjbxFgoFGUhYrAUTE/pTHpq DANVstvOWOlwtGSvZn1lezZKer4fVATDSQiGc2sCENbw5VRuXfUzUiwbF5vcThbukWvD Kvmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JsV8AWyX8acUS6WHQpB/l/52RmHryH1nT2n4AQxjNFw=; b=am8u5kT1NVsgXIzG3r9wYZ7YrRw8XZzOyLjuz/7leEv1L101qwvQm2C4P9bYRUg6wD zgSUf8FpBR2a8buBiHElbrSucCnTVGzS2U2t8dckF6cgEF8o+kiORrdsOBb7eJgQVWr2 INmggEMLtaOv7yZjZuxjVWM9CvsRvE5eqPj6d2F4JfpGVNAmsOUdUdKKnlHn9TH5Vm9S 38SBmWuDboVCxRYDlfShnr5EpBW0KMXGo0gHI1Eo6W6YrGYi/YboFN52E8DJrailFr4s 36kBnO1bs7CVV0CtY4GqaeQP3JvbktEkrBlPHDYS3UNXsqEoeb9nPITfHxId0ukYbRvq o5Aw== X-Gm-Message-State: ANoB5plcAEgTjKhptUnV2qd7OYWrus/m8CxYVKorMpAtV0r541YgxRty saaEA97zzwB9qiPKX7mJgsI= X-Google-Smtp-Source: AA0mqf4pPT8/4NO/pXyX73QBL/YeWIJ8mpN7WOHsn26nDHH1/K0XOxIweOXMwz5OS4yWGHGfWB2Jhg== X-Received: by 2002:a17:90a:d714:b0:21a:2d8:bf98 with SMTP id y20-20020a17090ad71400b0021a02d8bf98mr6987211pju.10.1670620050415; Fri, 09 Dec 2022 13:07:30 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y190-20020a6364c7000000b004777c56747csm1359273pgb.11.2022.12.09.13.07.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2022 13:07:30 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) 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:250461 Archived-At: > Your patch solves the issue described in the bug, but does not handle = another fontification error I discovered while > testing my patch: > > SimpleGenericMethod(params); > > In the above example SimpleGenericMethod is fontified using = font-lock-type-face instead of > font-lock-function-name-face. My patch fixes that case as well. > > As for which patch to choose: > > * =46rom an objective perspective, the way I understand the code, your = patch overrides an existing fontification to apply > variable-name instead. > * My patch however changes some selectors to be more specific = selectors to avoid fontifying the variable-identifier, and > also creates a new, highly-specific selector to fontify the = variable-name aspect as well. > > =46rom a performance perspective, I would assume the latter approach = is more performant, but I don't know enough > tree-sitter internals to say that with 100% confidence. > > Does anyone else know? I don=E2=80=99t think the two approach would have significant = difference. But I think more specific pattern is definitely better in terms of code = organization. Yuan