[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35925: perl-mode wrecks formats
From: |
Mauro Aranda |
Subject: |
bug#35925: perl-mode wrecks formats |
Date: |
Sat, 16 Sep 2023 20:03:14 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
tags 35925 patch
quit
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> In perl-mode,
>
> format FH =
> @<< @# @<< @### @<<<<< @# @<<<< @#
> (split)[0..5, 7..8]
> .
> write FH;
>
> becomes
>
> format FH =
> @<< @# @<< @### @<<<<< @# @<<<< @#
> (split)[0..5, 7..8]
> .
> write FH;
>
> wrecking output indentation and even introducing a syntax error on
the "." line.
>
> (See man perlform.)
>
> Seen with C-x h TAB, emacs-version "26.1".
AFAICS, perl-mode doesn't recognize a format declaration when indenting.
I attach a patch that adds a check, plus some tests.
0001-Fix-indentation-in-perl-mode-Bug-35925.patch
Description: Text Data
- bug#35925: perl-mode wrecks formats,
Mauro Aranda <=