Subject: bug#35925: closed (Re: bug#35925: perl-mode wrecks formats)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 01 Oct 2023 02:18:02 +0000

Your bug report

#35925: perl-mode wrecks formats

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35925: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35925
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#35925: perl-mode wrecks formats
From: Stefan Kangas <[email-masked]>
To: Mauro Aranda <[email-masked]>
Cc: 積丹尼 Dan Jacobson <[email-masked]>, [email-masked]
Date: Sat, 30 Sep 2023 19:17:01 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 30.1

Mauro Aranda <[email-masked]> writes:

> 積丹尼 Dan Jacobson <[email-masked]> 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.

Thanks, installed on master.

[1: 7caa3f5499b]: 2023-10-01 04:13:17 +0200
  Fix indentation in perl-mode (Bug#35925)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7caa3f5499b1ca4b6d66c1655a4e0d6903755679

Subject: perl-mode wrecks formats
From: 積丹尼 Dan Jacobson <[email-masked]>
To: [email-masked]
Date: Mon, 27 May 2019 21:11:05 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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