From unknown Mon Aug 18 19:29:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: jostein@secure.kjonigsen.net, casouri@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 19:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 60167@debbugs.gnu.org Cc: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= , casouri@gmail.com X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= , casouri@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.16713045262686 (code B ref -1); Sat, 17 Dec 2022 19:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 19:15:26 +0000 Received: from localhost ([127.0.0.1]:57536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6cec-0000hG-7R for submit@debbugs.gnu.org; Sat, 17 Dec 2022 14:15:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:39720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6cea-0000hA-WC for submit@debbugs.gnu.org; Sat, 17 Dec 2022 14:15:25 -0500 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 1p6cea-0002qX-KH for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 14:15:24 -0500 Received: from out-79.mta0.migadu.com ([91.218.175.79]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6ceY-0003vp-KB for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 14:15:24 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill Date: Sat, 17 Dec 2022 20:15:17 +0100 Message-ID: <87bko1u9iy.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=91.218.175.79; envelope-from=theo@thornhill.no; helo=out-79.mta0.migadu.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi there! We've had a small regression after fbf0d3b796ac1b891be35b642878a1fd412ee5ea, and this patch fixes that. Yuan, want to apply after Josteins agrees on this fix? There's an example of the currently failing code in the commit message. There's also a small whitespace fix inside - I hope that's ok. Thanks guys :-) Theo --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-wrong-capture-in-typescript-ts-mode.patch >From 931e96cd042aefe2807329de84751aa1a9e45bbb Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sat, 17 Dec 2022 20:07:59 +0100 Subject: [PATCH] Fix wrong capture in typescript-ts-mode An example of the issue could be: {({ active }) => ( link ? {text} : {text} )} Here 'link' as well as a lot of the other constructs inside of the parenthesized expression will be font-locked with 'font-lock-variable-name-face'. We only want to capture the identifier. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Make the variable capture only capture the identifier, and not the whole expression. --- lisp/progmodes/typescript-ts-mode.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index e7bd65c5e2..5eb810dd1d 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -231,7 +231,7 @@ typescript-ts-mode--font-lock-settings (arguments (identifier) @font-lock-variable-name-face) (parenthesized_expression (identifier) @font-lock-variable-name-face) - (parenthesized_expression (_ (identifier)) @font-lock-variable-name-face)) + (parenthesized_expression (_ (identifier) @font-lock-variable-name-face))) :language language :override t @@ -316,10 +316,7 @@ typescript-ts-mode--font-lock-settings :language language :feature 'escape-sequence :override t - '((escape_sequence) @font-lock-escape-face) - - - )) + '((escape_sequence) @font-lock-escape-face))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) -- 2.34.1 --=-=-=-- From unknown Mon Aug 18 19:29:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode References: <87bko1u9iy.fsf@thornhill.no> In-Reply-To: <87bko1u9iy.fsf@thornhill.no> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 23:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Theodor Thornhill Cc: 60167@debbugs.gnu.org, jostein@secure.kjonigsen.net Received: via spool by 60167-submit@debbugs.gnu.org id=B60167.167132025912958 (code B ref 60167); Sat, 17 Dec 2022 23:38:02 +0000 Received: (at 60167) by debbugs.gnu.org; 17 Dec 2022 23:37:39 +0000 Received: from localhost ([127.0.0.1]:58616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6gkN-0003Mw-99 for submit@debbugs.gnu.org; Sat, 17 Dec 2022 18:37:39 -0500 Received: from mail-pg1-f177.google.com ([209.85.215.177]:34521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6gkL-0003Mo-TK for 60167@debbugs.gnu.org; Sat, 17 Dec 2022 18:37:38 -0500 Received: by mail-pg1-f177.google.com with SMTP id 142so4017157pga.1 for <60167@debbugs.gnu.org>; Sat, 17 Dec 2022 15:37:37 -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=LIl0h+pWFT0EWtPRu6m0PjhSBbVjRfRxQsEt0jtfLrs=; b=j9riF5cpqdoQIVHpd1dFWv43UrGT5u+dxgsQ5CXruygZ4gjFJgwNjFk2KylV7LJhNo RVrYS1JoWswNPkVovsWekjXBsg6cD/Wn9HsVS/i2LE49yIcBDAM821Ph5eQ01ghjMaiG vPTD6ZzXZAI6+XWofRAGEW60wgf5xmnV+PhXHYHAVBXdfIJK2I/z4PPLey+6oj3R7pSP tleRXBq8maUIbieKYczhHSOw0o59ciNpAaCwo0m87Gg0C9gQjvXdu0WRGOQKnaERDYMd FDfjWNBM9JUFfnWYImkPFa7uI/cRv8LlSO1WTtVK/nna+Uq4XFL5+krOEUdbLuUJuSL+ zIkw== 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=LIl0h+pWFT0EWtPRu6m0PjhSBbVjRfRxQsEt0jtfLrs=; b=Kprg2faedx8/QnHiImNety0FtIstgi0l0p9+RMUogIozRKoAq825ulUTNJ4/Wq1d10 45ZWbdpAfhmzU6bHFZkyNS00N5AUXemBUBs8FEDvCkPPFPX6oQSjSt+1Z7qXHhmNyoEB aeN0ULIEU3PuZNnQKKGUaUKwz3dnFKicD3WeXBzPxsiXob6a/0b/G5GxKKIeyT1jW/V3 0aCyayhbMvQZkA/WU6g0KmBaUcw4A6vxl32LB9/GGfWarM2vN0xm09f9Q4HyVqryH69M cF5cKEzBpl1Gv7G+PFC8OwU6hhZnslDBnUCe13l+fYsxiGlcYWummAg+sybHjrpEaKNv y6Yw== X-Gm-Message-State: ANoB5pmt0QQmQNlemm7UrhyBkRLKcGU9r7BxdwuDkq1YnAytCut7ewrY Ec7aYgZo8ukZr9dYvrjwTn0MyJ4CFTA8pg== X-Google-Smtp-Source: AA0mqf4D6W3chv5eqzh+mHzBGZk3+qeAzD08fW6N4qtSeiHUQfvQ/hVFQgFrN6VVw2dhj8XBKrDnDA== X-Received: by 2002:aa7:8206:0:b0:56c:7803:1ab0 with SMTP id k6-20020aa78206000000b0056c78031ab0mr35657518pfi.29.1671320252253; Sat, 17 Dec 2022 15:37:32 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id i25-20020aa796f9000000b00572198393c2sm3655152pfq.194.2022.12.17.15.37.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2022 15:37:31 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Message-Id: Date: Sat, 17 Dec 2022 15:37:30 -0800 X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: > Hi there! > > We've had a small regression after > fbf0d3b796ac1b891be35b642878a1fd412ee5ea, and this patch fixes that. > Yuan, want to apply after Josteins agrees on this fix? There's an > example of the currently failing code in the commit message. There's > also a small whitespace fix inside - I hope that's ok. > > Thanks guys :-) > > Theo Cool, I=E2=80=99ll wait for Jostein=E2=80=99s opinion :-) Yuan From unknown Mon Aug 18 19:29:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 06:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuan Fu Cc: 60167@debbugs.gnu.org, jostein@secure.kjonigsen.net Received: via spool by 60167-submit@debbugs.gnu.org id=B60167.16713447116307 (code B ref 60167); Sun, 18 Dec 2022 06:26:02 +0000 Received: (at 60167) by debbugs.gnu.org; 18 Dec 2022 06:25:11 +0000 Received: from localhost ([127.0.0.1]:60270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6n6l-0001df-3a for submit@debbugs.gnu.org; Sun, 18 Dec 2022 01:25:11 -0500 Received: from out2.migadu.com ([188.165.223.204]:30080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6n6i-0001dV-LO for 60167@debbugs.gnu.org; Sun, 18 Dec 2022 01:25:09 -0500 Date: Sun, 18 Dec 2022 07:25:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1671344706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ubge8QLxsm9PRxZ/cim0By5+S3gWH0iwX6U3rYJeyHw=; b=Lyz//zUQuPKfBmd8zQCsVjTI581bzkFXP+8oQW6/OaXTPxm1iM3DJKDz0y6qCZqehpF+n2 34T1t9Sm2wzlpAMOZcC72agFpuaG1X71f9SyWr2MSWBxAKvLc9iAGe9OFUDN16K86rF0Hz mrV8hQl+3EQe/ieJaR5huV00U1z4rMExw/PBNXlHUStMIf9aBP7iEq66xEMxx6dbUjN5rN +RsgQQEvKcw01kSBUBW5UZ46riw6iPwBMxA0bqkmRI7P11XKOIdhqPg3/UnzHU3tYm42fw 1jw2n2wDAr6XQ+9lPBKVMxL9IPXO3Ky+G0XOteUMDmC8X4GCEs196dS7QsB0Iw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill In-Reply-To: References: Message-ID: <5F9FE776-8017-4CD5-9738-D99E76395C40@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 18 December 2022 00:37:30 CET, Yuan Fu wrote: > >Theodor Thornhill writes: > >> Hi there! >> >> We've had a small regression after >> fbf0d3b796ac1b891be35b642878a1fd412ee5ea, and this patch fixes that=2E >> Yuan, want to apply after Josteins agrees on this fix? There's an >> example of the currently failing code in the commit message=2E There's >> also a small whitespace fix inside - I hope that's ok=2E >> >> Thanks guys :-) >> >> Theo > >Cool, I=E2=80=99ll wait for Jostein=E2=80=99s opinion :-) > >Yuan He agreed :) Theo From unknown Mon Aug 18 19:29:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Theodor Thornhill Subject: bug#60167: closed (Re: bug#60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode) Message-ID: References: <87bko1u9iy.fsf@thornhill.no> X-Gnu-PR-Message: they-closed 60167 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 60167@debbugs.gnu.org Date: Sun, 18 Dec 2022 08:10:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1671351001-11854-1" This is a multi-part message in MIME format... ------------=_1671351001-11854-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 60167@debbugs.gnu.org. --=20 60167: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60167 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1671351001-11854-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60167-done) by debbugs.gnu.org; 18 Dec 2022 08:09:09 +0000 Received: from localhost ([127.0.0.1]:60697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6ojN-00034i-9M for submit@debbugs.gnu.org; Sun, 18 Dec 2022 03:09:09 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:34729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6ojL-00034a-12 for 60167-done@debbugs.gnu.org; Sun, 18 Dec 2022 03:09:07 -0500 Received: by mail-pj1-f47.google.com with SMTP id hd14-20020a17090b458e00b0021909875bccso11570578pjb.1 for <60167-done@debbugs.gnu.org>; Sun, 18 Dec 2022 00:09:06 -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=V7DBmnPILGCaeDihN0eZwru9MM2EiOY9+GgNVE7YzM0=; b=pyNToUM9Nvl0uwX2KH2/yBdvvo/q6TA3U0ZH4kJxcg8hH93Ltk19kJS6OSoBSoZslU b1zFzRk5P3sotxbZG/gQAJLVO6UBZnnCDlW3GJGVWJgR15gzCY7hiw41M214BFrDXTN2 /iNxqAYUwvkCbveh/DJ2FPc7lu6eZ/IYiK7wQv9tf+xK2dZepilpmg0xLkus/V0zMs+s QT98dmYWChspEdLy5ftbq1PHXgcvBZO8JgrOAn5tTz6L08WaH+wcciL5tUeRQU/uAI9G zVM2K7GNqlPl6I3BNWuredwNdpAcXZDVQvZvlALh9kRIPL8yH9WTgUkk93Amh5hAlrFf s6yg== 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=V7DBmnPILGCaeDihN0eZwru9MM2EiOY9+GgNVE7YzM0=; b=Awjrn/eZNNGjd7xXkW3n53KkqP4XFc2G2ZbolISPd3lKsw4kg5gn4tbaOgc1IlRGRG Yv7kgmraiaBXAuEvGd/Hmiko4CvznT04mwHExHh0v2yENgZEdXl7/RKeQKSK88IHPUbt F5OGOHlsS6pSOHNAe+pAMns/1PzIQwASc28agwvVX7XPwCkm7R6UjFrK6nkQigv7IpCd gydCc0mHtOtb0hi0uU2aG21bKBbiGki+ebknnjQjnkuKQRd6LkdgbTvd9zUWNX0E2CwG mHATW6j/0pq/eTJa+H9KhEsMObOS1jPe0ei9e8AQKEr0CjzqUs0KhtFtLhHnVmnyHXrJ qTjA== X-Gm-Message-State: ANoB5pk/5AYedoWSbJTHUEDX0x7Eynmu/UgajlSzPDB76mdSM1TaToTi qtr2ZJV8iMzPLklxC9v4KBI= X-Google-Smtp-Source: AA0mqf79O992hupFGYvS0/3iGPgW1vkUxqZ1mCMBMCI8NUUC78yG18Y2qGub+VtFgqgyx1OidPht6g== X-Received: by 2002:a17:902:6b46:b0:18f:a820:1811 with SMTP id g6-20020a1709026b4600b0018fa8201811mr24039695plt.31.1671350941231; Sun, 18 Dec 2022 00:09:01 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id n15-20020a170903110f00b00189651e5c26sm4593106plh.236.2022.12.18.00.09.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2022 00:09:00 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#60167: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode Message-Id: Date: Sun, 18 Dec 2022 00:08:59 -0800 To: Theodor Thornhill X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60167-done Cc: 60167-done@debbugs.gnu.org, jostein@secure.kjonigsen.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Theodor Thornhill writes: > On 18 December 2022 00:37:30 CET, Yuan Fu wrote: >> >>Theodor Thornhill writes: >> >>> Hi there! >>> >>> We've had a small regression after >>> fbf0d3b796ac1b891be35b642878a1fd412ee5ea, and this patch fixes that. >>> Yuan, want to apply after Josteins agrees on this fix? There's an >>> example of the currently failing code in the commit message. = There's >>> also a small whitespace fix inside - I hope that's ok. >>> >>> Thanks guys :-) >>> >>> Theo >> >>Cool, I=E2=80=99ll wait for Jostein=E2=80=99s opinion :-) >> >>Yuan > > He agreed :) > Theo Yeah I think I saw his message but it didn=E2=80=99t appear on debbugs = for some reason. Anyway, I applied the patch, thanks! Yuan ------------=_1671351001-11854-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 19:15:26 +0000 Received: from localhost ([127.0.0.1]:57536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6cec-0000hG-7R for submit@debbugs.gnu.org; Sat, 17 Dec 2022 14:15:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:39720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6cea-0000hA-WC for submit@debbugs.gnu.org; Sat, 17 Dec 2022 14:15:25 -0500 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 1p6cea-0002qX-KH for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 14:15:24 -0500 Received: from out-79.mta0.migadu.com ([91.218.175.79]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6ceY-0003vp-KB for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 14:15:24 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill To: bug-gnu-emacs@gnu.org Subject: 30.0.50; [PATCH]: Fix wrong capture in typescript-ts-mode X-Debbugs-Cc: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= , casouri@gmail.com Date: Sat, 17 Dec 2022 20:15:17 +0100 Message-ID: <87bko1u9iy.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=91.218.175.79; envelope-from=theo@thornhill.no; helo=out-79.mta0.migadu.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Hi there! We've had a small regression after fbf0d3b796ac1b891be35b642878a1fd412ee5ea, and this patch fixes that. Yuan, want to apply after Josteins agrees on this fix? There's an example of the currently failing code in the commit message. There's also a small whitespace fix inside - I hope that's ok. Thanks guys :-) Theo --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-wrong-capture-in-typescript-ts-mode.patch >From 931e96cd042aefe2807329de84751aa1a9e45bbb Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sat, 17 Dec 2022 20:07:59 +0100 Subject: [PATCH] Fix wrong capture in typescript-ts-mode An example of the issue could be: {({ active }) => ( link ? {text} : {text} )} Here 'link' as well as a lot of the other constructs inside of the parenthesized expression will be font-locked with 'font-lock-variable-name-face'. We only want to capture the identifier. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Make the variable capture only capture the identifier, and not the whole expression. --- lisp/progmodes/typescript-ts-mode.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index e7bd65c5e2..5eb810dd1d 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -231,7 +231,7 @@ typescript-ts-mode--font-lock-settings (arguments (identifier) @font-lock-variable-name-face) (parenthesized_expression (identifier) @font-lock-variable-name-face) - (parenthesized_expression (_ (identifier)) @font-lock-variable-name-face)) + (parenthesized_expression (_ (identifier) @font-lock-variable-name-face))) :language language :override t @@ -316,10 +316,7 @@ typescript-ts-mode--font-lock-settings :language language :feature 'escape-sequence :override t - '((escape_sequence) @font-lock-escape-face) - - - )) + '((escape_sequence) @font-lock-escape-face))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) -- 2.34.1 --=-=-=-- ------------=_1671351001-11854-1--