From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently Date: Mon, 5 Feb 2024 19:05:31 +0200 Message-ID: <627331b9-5759-43b1-a319-712c11ead2f6@gmail.com> References: <87y1ewgnn7.fsf@gmail.com> <9ae8eb33-fd8b-f8d6-dd7f-79f8d4464a51@gutov.dev> <87a5r2p4pq.fsf@gmail.com> <87bkbfkr1h.fsf@gmail.com> <22ea1559-f44e-933d-e60a-9caa62b376a8@gutov.dev> <878r69vow6.fsf@gmail.com> <95509dbc-7c71-4996-84f5-d37976e2661f@gutov.dev> <0d483c86-7e70-433c-8cea-15ac9238983c@gutov.dev> 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="30950"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Andrey Listopadov , 67246@debbugs.gnu.org To: Dmitry Gutov , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 05 18:06:09 2024 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 1rX2Q5-0007tx-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Feb 2024 18:06:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX2Pn-0003cu-15; Mon, 05 Feb 2024 12:05:51 -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 1rX2Pm-0003cT-4d for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:05:50 -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 1rX2Pl-0002m3-T5 for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:05:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rX2Py-00085X-7q for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2024 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67246 X-GNU-PR-Package: emacs Original-Received: via spool by 67246-submit@debbugs.gnu.org id=B67246.170715276131082 (code B ref 67246); Mon, 05 Feb 2024 17:06:02 +0000 Original-Received: (at 67246) by debbugs.gnu.org; 5 Feb 2024 17:06:01 +0000 Original-Received: from localhost ([127.0.0.1]:52202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX2Pw-00085G-L7 for submit@debbugs.gnu.org; Mon, 05 Feb 2024 12:06:00 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:60465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX2Pq-00084s-Rf for 67246@debbugs.gnu.org; Mon, 05 Feb 2024 12:05:58 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40fdd11475aso7290175e9.0 for <67246@debbugs.gnu.org>; Mon, 05 Feb 2024 09:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707152736; x=1707757536; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=L0FpeWHund+GwHjLmAGjQg1uOgCM2K4Zsn58OnFfdCQ=; b=UeN5k8q84jpt+5aHVwQQ/mldO+GxwbOMf7bBzKdN7vnGtSsX16/NOixTFTDgbGFSVr 2F5nZxb+sFpD1upnVBWUCF+OMEwv5/9pZhUymXhyiVBW6c70o5brQ55v8ev98NbKhYLG iHw0CQAnhfGxFNszP2QBFCNpjyfdBF74yVmvrDW0BJ+NxwKt+4su21cZBrE6I+gPrNm2 Q0CC3OCP99v+h7PzPImOMOy2bGB4Hv0U0eFlpO0bJI8x1Isg/9K8Ym9/Ub2z9PZrHv0B lBeghDeU1qms0Tu7DC2F6JHZ+wilzy6dHLiShgFT6uvFNHryMCRS6e2PmzzAo4xt2adE PsiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707152736; x=1707757536; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L0FpeWHund+GwHjLmAGjQg1uOgCM2K4Zsn58OnFfdCQ=; b=iP1uHAULY1lloGAKh+IlqXgnhmdKMSjzVmQ0jKBCQm9VlMfEzD0oM7NBRB5+0l9rok sCw+tG7JLc/bXcIbNsN/cgBv+i/0v+ArU8Kg6K8r72GEVfKcx92JttDjgxgIv2p5KToF V9jaNu1nxFk9CoX+cwApNs71XUg7yXiYT1t70K5Nj+fy963JsMx+fD4cVOCHRPnQ0YtC 5NFwYr62/nxeIyO547Oc4xdVxYRN4E927ToiRR+FPlEAACKtmqIcEALrrfvBhhrpKT6p mMSmTKSfU+uhmud5v7nPaG71wshqpWSbLZK44QeFVkPLJN80NUQuau4hLbpV1bQwlcPp bNUg== X-Gm-Message-State: AOJu0YwmYQK2PBL7vfukZFgRhvad7TTSmonMQKU5GODee3AvCVFHFlX/ kuNjp1wApMQg+M9dTaebDh8wngUKt26Ro3rbptDZmYx9Zf20Pm7yHFJSq3rvuLzryw== X-Google-Smtp-Source: AGHT+IHX0OkQf1T/AjMgfjmNSjqQD5hSpzfumA9OYZuu4vtWZIkuuWvCHbQZtvyvNLtoh/054ZCNzA== X-Received: by 2002:a05:6000:102:b0:33a:e76e:8b5c with SMTP id o2-20020a056000010200b0033ae76e8b5cmr81439wrx.33.1707152735916; Mon, 05 Feb 2024 09:05:35 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUa5C2cqvZkwQiX7ohDb4YkQiMUD4MKXvYwokbJAFEovfpAjPZxQtBEjvwpwskJypC3nBirOab3XTKweEiTXeAjHiLKmPrAb9O5aLGgHm7cXDJ4tY6cOP9lTNLWsaM= Original-Received: from [192.168.88.31] ([102.135.241.76]) by smtp.gmail.com with ESMTPSA id i4-20020a5d5584000000b0033b1b1da2adsm33540wrv.99.2024.02.05.09.05.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 09:05:35 -0800 (PST) Content-Language: en-US In-Reply-To: <0d483c86-7e70-433c-8cea-15ac9238983c@gutov.dev> 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:279456 Archived-At: On 2024/01/30 03:59, Dmitry Gutov wrote: > On 29/01/2024 06:08, Dmitry Gutov wrote: >> Hi! >> >> On 13/01/2024 10:50, Wilhelm Kirschbaum wrote: >>> + (access_call target: (identifier) @font-lock-variable-name-face) + >>> (access_call "[" key: (identifier) @font-lock-variable-name-face "]")) >> >> This should use font-lock-variable-use-face. And all other "variable >> reference" highlights should use it too. >> >> OTOH, the method parameters are still highlighted with >> font-lock-variable-use-face, which should be >> font-lock-variable-name-face. >> >> This happens inside the first 'elixir-variable' highlight. Perhaps >> elixir-ts--definition-keywords-re could be used there to disambiguate >> as well. > > See this combined patch: > > 1. Your additions from the last attachment (access target highlighting). > 2. All instances of font-lock-variable-name-face swapped for > font-lock-variable-use-face (since most of those match variable > references). Thanks, this makes sense. > 3. Added highlighting for method parameters with > font-lock-variable-name-face. I had a look and think it covers most instances ( some should arguably not be highlighted as use-face, but can be debated ). > 4. Feature elixir-function-name renamed to elixir-definition since it > now touches both function and variable (parameter) definitions. Makes sense > 5. Feature elixir-variable moved to the feature level 4, since that's > where it is in other built-in ts modes. > Agreed. > Any objections to it? Thanks for the effort and I have no objections. There are however some more issues I spotted on the function-name and function-call matches which I will be looking into. Wilhelm