GNU bug report logs - #67061
[PATCH] Improve syntax highlighting for python-ts-mode

Previous Next

Package: emacs;

Reported by: Denis Zubarev <dvzubarev <at> yandex.ru>

Date: Sat, 11 Nov 2023 02:23:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Yuan Fu <casouri <at> gmail.com>
To: Denis Zubarev <dvzubarev <at> yandex.ru>, 67061 <at> debbugs.gnu.org
Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Sun, 10 Dec 2023 22:53:58 -0800
Here's my long due review:

> Improve syntax highlighting for python-ts-mode.
>
> - Fontify compound keywords "not in" and "is not" (fixes bug#67015)
This is great, though you'll need to rebase your changes on top of 
latest emacs-29 now, because I added one of the keywords when fixing 
bug#67015. Sorry for the trouble.
> - Fix fontification of strings inside of f-strings interpolation,
>     e.g. for f"beg {'nested'}" - 'nested' was not fontified as string.
I see that you removed string-interpolation feature, I don't know how I 
feel about it. For one, if this fix is to be applied to emacs-29, we 
cannot remove that feature—that's a breaking change IMO.

Can we do this instead: in python--treesit-fontify-string, we check if 
string-interpolation feature is enabled, if it is, fontify string_start, 
string_content and string_end only; if not, fontify the whole string.
> - Do not override the face of builtin functions (all, bytes etc.) with
>    the function call face
> - Fontify built-ins (dict,list,etc.) as types when they are used in type hints
LGTM

> - Add missing assignment expressions

Do you have examples on the type of assignments you are adding 
fontification for?

Some general tips: for comments, we always write complete sentences, 
capitalize the first character and ends with a period. Also I see double 
empty lines and missing empty lines at places.

Yuan




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

Previous Next


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