J
Julien K.
Dear Emacs & Perl users,
[ This post is an updated version of a previous post on gnu.emacs.help that
didn't get any answer; sorry for those who read both groups]
I'm having trouble with 'sub' indentation with cperl mode (version > 4.32).
I think my problem does not depend on the emacs version but on cperl version
as I got the same behaviour on Linux and OsX both with last Emacs and XEmacs.
I'm using GNU-style indentation, the incorrect indentation happens after
the 'sub' closing statement.
With my current setting the following line is indented like the closing
brace of the 'sub':
<<<<<
sub mySub
{ my ($self) = @_ ;
# perl stuff
return ($var) ;
}
# Other stuff
sub myOtherSub
{ ...
^^ Extra indent
I'd like 'sub' block indentation be like 'foreach' or 'if' blocks, ie
return to column 0 for the next statement.
<<<<<
sub mySub
{ my ($self) = @_ ;
# perl stuff
return ($var) ;
}
# Other stuff
sub myOtherSub
{ ...
Any hints?
Cheers,
Julien
[ This post is an updated version of a previous post on gnu.emacs.help that
didn't get any answer; sorry for those who read both groups]
I'm having trouble with 'sub' indentation with cperl mode (version > 4.32).
I think my problem does not depend on the emacs version but on cperl version
as I got the same behaviour on Linux and OsX both with last Emacs and XEmacs.
I'm using GNU-style indentation, the incorrect indentation happens after
the 'sub' closing statement.
With my current setting the following line is indented like the closing
brace of the 'sub':
<<<<<
sub mySub
{ my ($self) = @_ ;
# perl stuff
return ($var) ;
}
# Other stuff
sub myOtherSub
{ ...
^^ Extra indent
I'd like 'sub' block indentation be like 'foreach' or 'if' blocks, ie
return to column 0 for the next statement.
<<<<<
sub mySub
{ my ($self) = @_ ;
# perl stuff
return ($var) ;
}
# Other stuff
sub myOtherSub
{ ...
Any hints?
Cheers,
Julien