GNU bug report logs - #67809
[PATCH] Add font-locking for assignments in typescript-ts-mode

Previous Next

Package: emacs;

Reported by: Noah Peart <noah.v.peart <at> gmail.com>

Date: Wed, 13 Dec 2023 08:34:02 UTC

Severity: wishlist

Tags: patch

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Noah Peart <noah.v.peart <at> gmail.com>
Subject: bug#67809: closed (Re: bug#67809: [PATCH] Add font-locking for
 assignments in typescript-ts-mode)
Date: Sat, 23 Dec 2023 20:58:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#67809: [PATCH] Add font-locking for assignments 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 67809 <at> debbugs.gnu.org.

-- 
67809: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67809
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>, Noah Peart <noah.v.peart <at> gmail.com>
Cc: 67809-done <at> debbugs.gnu.org
Subject: Re: bug#67809: [PATCH] Add font-locking for assignments in
 typescript-ts-mode
Date: Sat, 23 Dec 2023 22:57:17 +0200
On 23/12/2023 13:21, Eli Zaretskii wrote:
>> From: Noah Peart<noah.v.peart <at> gmail.com>
>> Date: Sat, 23 Dec 2023 05:39:17 -0500
>> Cc: Dmitry Gutov<dmitry <at> gutov.dev>,67809 <at> debbugs.gnu.org
>>
>> I think this should be closed for now.
> If Dmitry agrees, it's fine by me.

Closing. I'm sorry if this was a disappointing response.

[Message part 3 (message/rfc822, inline)]
From: Noah Peart <noah.v.peart <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add font-locking for assignments in typescript-ts-mode
Date: Wed, 13 Dec 2023 00:33:16 -0800
[Message part 4 (text/plain, inline)]
Tags: patch


This patch adds fontification for the left-hand side of assignments in
typescript-ts-mode.

The object and/or property being assigned to is fontified with
`font-lock-variable-name-face` and/or `font-lock-property-name-face`,
while any other identifiers/properties on the left-hand side used in
index expressions are fontified with
`font-lock-variable-use-face`/`font-lock-property-use-face`.

For example, fontification is added in `typescript-ts-mode` for
identifiers in statements like the following:

    arr[obj.x * obj.x] = 1;
    //^ font-lock-variable-name-face
    //    ^ font-lock-variable-use-face
    //      ^ font-lock-property-use-face
    obj.x.y = 0;
    //^ font-lock-variable-name-face
    //  ^ font-lock-property-name-face
    //    ^ font-lock-property-name-face
    ++mat[x][arr[0]];
    // ^ font-lock-variable-name-face
    //        ^ font-lock-variable-use-face

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0) of 2023-12-12 built on noah-X580VD
Repository revision: 75fd7550ed6cede6c9e8224f1f2d62637c43fdd4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured using:
 'configure --prefix=/usr/local --with-modules --with-tree-sitter
--with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls
--with-json --with-mailutils --with-jpeg --with-png --with-rsvg
--with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12
CXX=gcc-12'
[Message part 5 (text/html, inline)]
[typescript-ts-fontify-assignments.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.