From: "Harald Jörg" <haj@posteo.de>
To: 11733-done@debbugs.gnu.org
Subject: bug#11733: Indentation has been fixed in the master branch.
Date: Sat, 01 Jul 2023 22:50:07 +0000 [thread overview]
Message-ID: <875y73nt5s.fsf@oook.m.uunet.de> (raw)
In-Reply-To: <871ulcdhkv.fsf@ypig.lip.ens-lyon.fr>
Eventually, the reworking of the indentation code allows to fix these
bugs (again, thanks for the clear recipes).
The first example will now be indented like this:
--------------------------------------------------
#!/usr/bin/env perl
# -*- mode: cperl -*-
sub foo
{
}
sub bar
{
}
--------------------------------------------------
This is in line with the Perl style guide
https://perldoc.perl.org/perlstyle.
The second example is a masterpiece of edge cases:
--------------------------------------------------
#!/usr/bin/env perl
# -*- mode: cperl -*-
while (<>)
{
m:^ \d+ p:
or die;
m:^ \d+ :
or die;
}
--------------------------------------------------
The strings 'm:' and 'p:' look like labels, and cperl-mode must take
extra measures to detect these situations. This is now done. When
indented line-by-line, cperl-mode will now the leave the indentation
unchanged.
cperl-mode.el from the repository works with Emacs versions 27 and
newer.
Therefore, I am declaring this bug "done".
--
Cheers,
haj
prev parent reply other threads:[~2023-07-01 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 10:45 bug#11733: 24.1; cperl indentation bugs Vincent Lefevre
2012-06-19 16:23 ` Glenn Morris
2019-09-21 0:50 ` Stefan Kangas
2023-07-01 22:50 ` Harald Jörg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y73nt5s.fsf@oook.m.uunet.de \
--to=haj@posteo.de \
--cc=11733-done@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.