bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11733: Indentation has been fixed in the master branch.


From: Harald Jörg
Subject: bug#11733: Indentation has been fixed in the master branch.
Date: Sat, 01 Jul 2023 22:50:07 +0000

Eventually, the reworking of the indentation code allows to fix these
bugs (again, thanks for the clear recipes).

The first example will now be indented like this:
--------------------------------------------------
#!/usr/bin/env perl
# -*- mode: cperl -*-

sub foo
{
}

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

This is in line with the Perl style guide
https://perldoc.perl.org/perlstyle.

The second example is a masterpiece of edge cases:
--------------------------------------------------
#!/usr/bin/env perl
# -*- mode: cperl -*-

while (<>)
  {
    m:^  \d+ p:
      or die;
    m:^  \d+ :
      or die;
  }
--------------------------------------------------
The strings 'm:' and 'p:' look like labels, and cperl-mode must take
extra measures to detect these situations.  This is now done.  When
indented line-by-line, cperl-mode will now the leave the indentation
unchanged.

cperl-mode.el from the repository works with Emacs versions 27 and
newer.

Therefore, I am declaring this bug "done".

-- 
Cheers,
haj





reply via email to

[Prev in Thread] Current Thread [Next in Thread]