perl - How do I keep braces from moving in Emacs cperl mode? -
i'm using gnu emacs 22.2.1 , cperl 5.23.
i have perl code this:
sub foo { if($x) { print "x"; } else { print "y"; } }
i'd reindent code 2-space indent. when run cperl-indent-region
on code, get:
sub foo { if ($x) { print "x"; } else { print "y"; } }
- how can keep outer brace @ left margin / column 0?
- how can prevent opening brace if , else moving previous line?
i believe customization you're looking is:
(setq cperl-extra-newline-before-brace t cperl-brace-offset -2 cperl-merge-trailing-else nil)
you can customize cperl mode m-x customize-group <enter> cperl <enter>
. indentation variables in cperl indentation details subgroup.
Comments
Post a Comment