Subject: Re: bug#60546: Acknowledgement (29.0.60; typescript-ts-mode and tsx-ts-mode does not highlight variable-declarations in catch-clauses)

From: Jostein Kjønigsen <[email-masked]>
Date: Wed, 4 Jan 2023 10:30:06 +0100

On 04.01.2023 09:18, GNU bug Tracking System wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>   [email-masked]
>
> If you wish to submit further information on this problem, please
> send it to [email-masked].
>
> Please do not send mail to [email-masked] unless you wish
> to report a problem with the Bug-tracking system.
>
And as usual I have another patch coming up with further 
consistency-improvements. :)

--
Jostein
From 886915f487560113ffbd8a7bb03ce9cb21cef138 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <[email-masked]>
Date: Wed, 4 Jan 2023 09:13:23 +0100
Subject: [PATCH 2/2] Fix highlighting of variable-declarations in
 typescript-ts-mode

lisp/progmodes/typescript-ts-mode.el:
- highlight variable declarations in catch-clauses.
- remove highlighting of variables where not declarations (improve
  consistency with other *-ts-modes).
---
 lisp/progmodes/typescript-ts-mode.el | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index e0583f4b05c..3c25c9837b3 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -194,7 +194,10 @@ typescript-ts-mode--font-lock-settings
       name: (array_pattern
              (identifier)
              (identifier) @font-lock-function-name-face)
-      value: (array (number) (function))))
+      value: (array (number) (function)))
+
+     (catch_clause
+      parameter: (identifier) @font-lock-variable-name-face))
 
    :language language
    :override t
@@ -225,12 +228,7 @@ typescript-ts-mode--font-lock-settings
        (_ (_ (identifier) @font-lock-variable-name-face))
        (_ (_ (_ (identifier) @font-lock-variable-name-face)))])
 
-     (return_statement (identifier) @font-lock-variable-name-face)
-
      (binary_expression left: (identifier) @font-lock-variable-name-face)
-     (binary_expression right: (identifier) @font-lock-variable-name-face)
-
-     (arguments (identifier) @font-lock-variable-name-face)
 
      (parenthesized_expression (identifier) @font-lock-variable-name-face)
      (parenthesized_expression (_ (identifier) @font-lock-variable-name-face)))
@@ -245,8 +243,6 @@ typescript-ts-mode--font-lock-settings
 
      (pair key: (property_identifier) @font-lock-variable-name-face)
 
-     (pair value: (identifier) @font-lock-variable-name-face)
-
      ((shorthand_property_identifier) @font-lock-property-face)
 
      ((shorthand_property_identifier_pattern)
-- 
2.37.2