I'm using GNU Emacs 22.2.1 and cperl 5.23.
I have perl code like this:
sub foo
{
if($x)
{
print "x";
}
else
{
print "y";
}
}
I'd like to reindent the code to a 2-space indent. But when I run cperl-indent-region
on this code, I get:
sub foo
{
if ($x) {
print "x";
} else {
print "y";
}
}
- How can I keep the outer brace at the left margin / column 0?
- How can I prevent the opening brace for the if and else from moving up to the previous line?