views:

120

answers:

1

How can I set up cperl mode in Emacs so that the indentation after brackets, e.g.

has 'name'    => (
                  is       => 'rw',
                  isa      => 'Str',
                  required => 1,
              );

(default indentation) becomes more like that seen in, for example, the Moose manual, e.g.

has 'password' => (
    is  => 'rw',
    isa => 'Str',
);

?

+2  A: 

I found the answer on the Emacs Wiki. Add the following to .emacs:

(custom-set-variables
     '(cperl-indent-parens-as-block t))
Kinopiko