Subject: Re: bug#11733: 24.1; cperl indentation bugs

From: Stefan Kangas <[email-masked]>
Date: Sat, 21 Sep 2019 02:50:55 +0200

Vincent Lefevre <[email-masked]> writes:

> The indentation in CPerl mode is buggy on sub, even with the default
> configuration (emacs -Q). Open the following file:
>
> ----------------------------------------
> #!/usr/bin/env perl
> # -*- mode: cperl -*-
>
> sub foo
>   {
>   }
>
> sub bar
>   {
>   }
> ----------------------------------------
>
> and hit the [TAB] key over the "sub bar" line. This line is indented
> by 2 columns instead of being left on the first column. More generally
> this happens on all subs except the first one.
>
> [TAB] on the '{' of sub bar (line 9 of the script) gives a 4-column
> indentation instead of 2, but this may be a consequence of the above
> problem.

I can reproduce this on Emacs 26.1.

> Other indentation bugs:
>
> ----------------------------------------
> #!/usr/bin/env perl
> # -*- mode: cperl -*-
>
> while (<>)
>   {
>     m:^  \d+ p:
>       or die;
>     m:^  \d+ :
>       or die;
>   }
> ----------------------------------------

I can reproduce this too.

Best regards,
Stefan Kangas