#935312 emacs-common: CPerl mode indentation bugs

Package:
emacs-common
Source:
emacs
Submitter:
Vincent Lefevre
Date:
2023-07-03 17:36:11 UTC
Severity:
minor
Tags:
#935312#5
Date:
2019-08-21 14:09:06 UTC
From:
To:
With the following Perl script loaded in CPerl mode ("emacs -q" then
M-x cperl-mode), when I type [Tab] on the "sub bar" line, this line
is indented instead of remaining at the same place.
----------------------------------------
#!/usr/bin/env perl

sub foo
  {
  }

sub bar
  {
  }
----------------------------------------

In fact, the problem appears more often when one types "sub bar", then
[Enter], then "{". One gets:

sub bar
    {

instead of

sub bar
  {

#935312#10
Date:
2019-08-21 14:18:13 UTC
From:
To:
Another one:

while (<>)
  {
    m:^  \d+ p:
      or die;
    m:^  \d+ :
      or die;
  }

[TAB] on "or die;" gives:
  * a 4-column indentation instead of 6 for the 1st one,
  * a 8-column indentation instead of 6 for the 2nd one.