GNU bug report logs - #79271
30.1; cperl-mode regexp indent issue

Previous Next

Package: emacs;

Reported by: John C <john.ciolfi.32 <at> gmail.com>

Date: Tue, 19 Aug 2025 17:44:02 UTC

Severity: normal

Found in version 30.1

Done: Harald Jörg <haj <at> posteo.de>

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: John C <john.ciolfi.32 <at> gmail.com>, Harald Jörg <haj <at> posteo.de>
Cc: 79271 <at> debbugs.gnu.org
Subject: bug#79271: 30.1; cperl-mode regexp indent issue
Date: Wed, 20 Aug 2025 17:40:59 +0300
> From: John C <john.ciolfi.32 <at> gmail.com>
> Date: Tue, 19 Aug 2025 13:43:14 -0400
> 
> 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from
>    https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el
>    I used the Jul-28-2025 version
>   
> https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el
> 
> 
> 2. cd ~/tmp
> 
> 3. emacs -Q -L .           # Using emacs 30.1
> 
> 4. M-x byte-compile-file RET cperl-mode.el RET
> 
> 5. C-x C-f foo.pl
> 
>    C-x h   # select all of foo.pl
>    C-M-\   # indent foo.pl
> 
> Here's the indented foo.pl:
> 
> # -*- mode: cperl -*-
> my $str =~ s/^
>     (Field1: [^\n]+) \s*
>   Field2: \s* (\S+) \s*
>             //xsm;
> 
> Notice that the regexp is not indented nicely. I would expect "Field2 ..." to be aligned under
> "(Field...)":
> 
>   my $str =~ s/^
>                (Field1: [^\n]+) \s*
>                Field2: \s* (\S+) \s*
>                //xsm;

And this one, too.




This bug report was last modified 20 days ago.

Previous Next


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