unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: "Håkon Hægland" <hakon.hagland@gmail.com>
Cc: 19709@debbugs.gnu.org
Subject: bug#19709: Problem with indentation for the closing parenthesis in cperl-mode version 6.1
Date: Fri, 5 Jul 2019 22:14:06 +0200	[thread overview]
Message-ID: <CADwFkmkxpY_TpkKXr5bkMMWqrN-5dZ77s7uNH4564iz6oF1Uvg@mail.gmail.com> (raw)
In-Reply-To: <CACxbc=BgnKsb=KYQez74XQ30KbXChOqmyAyo8wf_63URDp5VBA@mail.gmail.com>

Håkon Hægland <hakon.hagland@gmail.com> writes:

> I have problems with correct alignment of the closing parenthesis in cperl-mode. For example consider the following Perl code:
>
> my $a = func1(
>     Module::test()
>   );
>
> my $b = func2(
>     test()
> );
>
> my $c = func3(
>     Module::test(),
> );
> We see that the closing parenthesis is not correctly indented for func1, but for func2 and func3 it is correct.
>
> In cperl-mode-hook I have
>
> (setq cperl-indent-level 4)
> (setq cperl-indent-parens-as-block t)
> (setq cperl-close-paren-offset -4)
>
> It seems to me that this behavior is related to the newest version of cperl-mode. I am using Emacs 24.4 on Ubuntu 14.04, and the cperl-mode that came with the installation (/opt/emacs24.4/share/emacs/24.4/lisp/progmodes/cperl-mode.el.gz) is version 6.1
> of cperl-mode.
>
> I then tried to install cperl-mode from ELPA using Emacs 24.4 package manager (list-packages), and it turned out that it gave me version 5.23 of cperl-mode which also indented the closing parenthesis correctly..

I can reproduce this on Emacs 26.2.

BTW, the problem goes away when I set:

  (setq cperl-label-offset 0)

But of course you shouldn't have to do that.

Best regards,
Stefan Kangas





  reply	other threads:[~2019-07-05 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28  7:30 bug#19709: Problem with indentation for the closing parenthesis in cperl-mode version 6.1 Håkon Hægland
2019-07-05 20:14 ` Stefan Kangas [this message]
2020-11-04 20:01 ` bug#19709: [PATCH] Verify that indentation works with current cperl-mode Harald Jörg
2020-11-09 14:28   ` Lars Ingebrigtsen
2020-11-09 16:06     ` Harald Jörg
2020-11-10 13:56       ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmkxpY_TpkKXr5bkMMWqrN-5dZ77s7uNH4564iz6oF1Uvg@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=19709@debbugs.gnu.org \
    --cc=hakon.hagland@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).