[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18985: 24.3; cperl-mode misindents hash keys that start with an auto
From: |
Stefan Kangas |
Subject: |
bug#18985: 24.3; cperl-mode misindents hash keys that start with an auto-quoted keyword |
Date: |
Fri, 5 Jul 2019 22:04:03 +0200 |
avarab@gmail.com (Ævar Arnfjörð Bjarmason) writes:
> cperl-mode has a nasty bug in M-x indent-region, if you write this to a
> file:
>
> my %x = (
> for_me => "cookie",
> );
>
> And indent it you end up with:
>
> my %x = (
> for _me => "cookie",
> );
>
> Note the space between the "for" and "_me", the indenter falsely thought
> that "for" was a keyword and suffixed it with a space, changing the
> semantics of the code.
>
> The same issue happens with some other keywords, e.g. "if" and "until",
> but interestingly not "unless".
I can reproduce this on Emacs 26.2.
Best regards,
Stefan Kangas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#18985: 24.3; cperl-mode misindents hash keys that start with an auto-quoted keyword,
Stefan Kangas <=