GNU bug report logs - #35925
perl-mode wrecks formats

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 27 May 2019 13:59:02 UTC

Severity: minor

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#35925: closed (perl-mode wrecks formats)
Date: Sun, 01 Oct 2023 02:18:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 30 Sep 2023 19:17:01 -0700
with message-id <CADwFkmkDfbJHdRTrfF__gGeDhQ1uWEkZVr9fxcANi2dhubZ9zg <at> mail.gmail.com>
and subject line Re: bug#35925: perl-mode wrecks formats
has caused the debbugs.gnu.org bug report #35925,
regarding perl-mode wrecks formats
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
35925: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35925
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: perl-mode wrecks formats
Date: Mon, 27 May 2019 21:11:05 +0800
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".


[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 35925-done <at> debbugs.gnu.org
Subject: Re: bug#35925: perl-mode wrecks formats
Date: Sat, 30 Sep 2023 19:17:01 -0700
Version: 30.1

Mauro Aranda <maurooaranda <at> gmail.com> writes:

> 積丹尼 Dan Jacobson <jidanni <at> 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.

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


This bug report was last modified 1 year and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.