GNU bug report logs - #78129
[PATCH] 31.0.50; python-ts-mode fontification does not handle normal python constructs

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Tue, 29 Apr 2025 09:42:06 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

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: Yuan Fu <casouri <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78129: closed ([PATCH] 31.0.50; python-ts-mode fontification
 does not handle normal python constructs)
Date: Thu, 01 May 2025 07:55:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 1 May 2025 00:54:08 -0700
with message-id <14E02C69-E9E9-48DA-8B2F-6656D54D8C5F <at> gmail.com>
and subject line Re: bug#78129: Acknowledgement ([PATCH] 31.0.50; python-ts-mode fontification does not handle normal python constructs)
has caused the debbugs.gnu.org bug report #78129,
regarding [PATCH] 31.0.50; python-ts-mode fontification does not handle normal python constructs
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78129: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78129
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] 31.0.50; python-ts-mode fontification does not handle normal
 python constructs
Date: Tue, 29 Apr 2025 11:40:32 +0200
[Message part 3 (text/plain, inline)]
Hey everyone.

When using python-ts-mode to edit python code, there's quite a few areas where fontification is lacking, but could be provided by the treesitter syntax tree.

* Constants
* Type-names
* variable-names in for-in statements
* import-names in import statements
* variable-declarations in lambda-expressions

Attached is a patch which fixes this.

—
Kind Regards
Jostein Kjønigsen


[Message part 4 (text/html, inline)]
[0001-python-ts-mode-Improve-fontification.patch (application/octet-stream, attachment)]
[Message part 6 (text/html, inline)]
[Message part 7 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Cc: Denis Zubarev <dvzubarev <at> yandex.ru>, 78129-done <at> debbugs.gnu.org
Subject: Re: bug#78129: Acknowledgement ([PATCH] 31.0.50; python-ts-mode
 fontification does not handle normal python constructs)
Date: Thu, 1 May 2025 00:54:08 -0700

> On Apr 30, 2025, at 2:25 PM, Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> wrote:
> 
> And yet a newer patch, which add enum-values being fontified as constants on top of the things discussed below.
> 
> Note: This patch removes a "override" rule which used to be in place. I'm writing Python using typing and from I can tell, removing this rule does not have any adverse affects on my code.
> 
> Since Denis added that override, I've put him on CC so he can verify if he can confirm my assessment.

Brilliant work! Applied to master. BTW, make sure you reply messages below the quoted original message ;)

Yuan

This bug report was last modified 17 days ago.

Previous Next


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