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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55572 in the body.
You can then email your comments to 55572 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55572; Package emacs. (Sun, 22 May 2022 09:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lele Gaifax <lele <at> metapensiero.it>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 22 May 2022 09:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lele Gaifax <lele <at> metapensiero.it>
To: bug-gnu-emacs <at> gnu.org
Subject: 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.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55572; Package emacs. (Sun, 22 May 2022 11:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 55572 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Lele Gaifax <lele <at> metapensiero.it>
Cc: 55572 <at> debbugs.gnu.org
Subject: Re: bug#55572: Properly indent Python PEP634 match/case blocks
Date: Sun, 22 May 2022 13:23:40 +0200
Lele Gaifax <lele <at> metapensiero.it> writes:

> 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.

Thanks; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 55572 <at> debbugs.gnu.org and Lele Gaifax <lele <at> metapensiero.it> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 22 May 2022 11:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Jun 2022 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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