GNU bug report logs - #33183
perl-mode: indent-region injects spaces after newlines causing data loss

Previous Next

Package: emacs;

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

Date: Sun, 28 Oct 2018 01:59:01 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 33183 <at> debbugs.gnu.org
Subject: bug#33183: perl-mode: indent-region injects spaces after newlines causing data loss
Date: Sun, 28 Oct 2018 08:56:47 +0800
In perl-mode

%fields = (
    u =>
    'test
ing' . q{test
2} .
    qq/last
test/ );

becomes

%fields = (
    u =>
    'test
    ing' . q{test
    2} .
    qq/last
    test/ );

after running indent-region, on the region. However

my $x= 'new
    line';
my $y= q{new
    line};

is unaffected, thankfully.
emacs-version "25.2.2"

Also wrecks
     u =>
    <<EOF
nnnn
xxxx
EOF

P.S., takes a lot of work to repair wrecked areas. One form of data loss!

In fact it even wrecks top level here-docs:
my $x = <<EOF;
nnnn
xxxx
EOF

will get wrecked.

Also wrecks
sub mq{
    return "a
b";}




This bug report was last modified 4 years and 163 days ago.

Previous Next


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