How do I adjust cperl mode indentation of qw//?

304 Views Asked by At

Following on from this question, here's another bugbear.

I am getting

my @browsers = qw/
                     Firefox
                     MSIE
/;

but I want

my @browsers = qw/
    Firefox
    MSIE
/;

What setting in cperl mode in Emacs might I use to achieve that?

1

There are 1 best solutions below

1
On BEST ANSWER

There isn't one. x// is handled as a special case, and the information about the indent of the line that starts the statement is not available:

http://github.com/jrockway/cperl-mode/blob/mx-declare/cperl-mode.el#L3074

This can be fixed with a bit of munging in cperl-sniff-for-indent and cperl-calculate-indent. Patch welcome!