GNU bug report logs - #55572
Properly indent Python PEP634 match/case blocks

Previous Next

Package: emacs;

Reported by: Lele Gaifax <lele <at> metapensiero.it>

Date: Sun, 22 May 2022 09:04:02 UTC

Severity: normal

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: Lele Gaifax <lele <at> metapensiero.it>
To: 55572 <at> debbugs.gnu.org
Subject: bug#55572: Properly indent Python PEP634 match/case blocks
Date: Sun, 22 May 2022 11:03:22 +0200
[Message part 1 (text/plain, inline)]
Hi,

PEP634, introduced in Python 3.10, added two new keywords, "match"
and "case". Commit 139042eb8629e6fd49b2c3002a8fc4d1aabd174d added them to the
font-lock machinery, but missed the opportunity to configure them as
block-starter as well.

The attached patch does that, adding also two simple indentation tests.

All the best,
ciao, lele.
[0001-Properly-indent-Python-PEP634-match-case-blocks.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele <at> metapensiero.it  |                 -- Fortunato Depero, 1929.

This bug report was last modified 3 years ago.

Previous Next


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