GNU bug report logs - #45341
[PATCH] Make python-mode fontify more assignment statements

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Sun, 20 Dec 2020 16:26:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.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: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: 45341 <at> debbugs.gnu.org
Subject: bug#45341: [PATCH] Make python-mode fontify more assignment statements
Date: Sun, 20 Dec 2020 17:25:16 +0100
[Message part 1 (text/plain, inline)]
The current implementation in python-mode fontifies only basic
assignment statements.  It makes mistakes on or entirely misses more
complex ones such as

  [a, b, c] = 1, 2, 3
  a, *b, c = range(10)
  inst.a, inst.b, inst.c = 'foo', 'bar', 'baz'
  (a, b, *c, d) = x, *y = 5, 6, 7, 8, 9

The patch attached below extends the fontification to work correctly
with all these cases.  I tested things as well as I could, but would
appreciate further testing.

[0001-Make-python-mode-fontify-more-assignment-statements.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
Best regards,
Dario

-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid

This bug report was last modified 4 years and 238 days ago.

Previous Next


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