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


Message #25 received at control <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 35925 <at> debbugs.gnu.org
Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#35925: perl-mode wrecks formats
Date: Sat, 16 Sep 2023 20:03:14 -0300
[Message part 1 (text/plain, inline)]
tags 35925 patch
quit


積丹尼 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.
[0001-Fix-indentation-in-perl-mode-Bug-35925.patch (text/x-patch, attachment)]

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.