GNU bug report logs - #46233
28.0.50; python-mode font-lock assignment issues

Previous Next

Package: emacs;

Reported by: Михаил Панарин <mykhailopanarin <at> gmail.com>

Date: Mon, 1 Feb 2021 12:11:01 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Михаил Панарин
 <mykhailopanarin <at> gmail.com>
To: 46233 <at> debbugs.gnu.org
Subject: bug#46233: 28.0.50; python-mode font-lock assignment issues
Date: Mon, 1 Feb 2021 13:55:01 +0200
[Message part 1 (text/plain, inline)]
emacs-version: "GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
Version 3.24.24, cairo version 1.17.4)
 of 2021-01-22"

Sometimes assignments are not fontified or fontified incorrectly.
Steps to reproduce:
1. Create a python file with contents
> def foo(bar: int) -> str:
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs
>
>
> def foo2(bar: int):
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs
>
>
> def foo3(bar):
>     spam = bar
>     eggs = f'lkjahsd {spam}'
>     return eggs

2. Open the file with emacs -Q

You will see that variables `spam` and `bar` are highlighted differently
in all 3 cases.
`spam`:
  not highlighted at all in cases `foo` and `foo2`
`bar`:
  not highlighted correctly in cases `foo` and `foo3`

Best regards,
Mykhailo
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 337 days ago.

Previous Next


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