Greetings,
I'm trying to get abbrev's for if, while, for, and others to work
with cc-mode and skeletons. I'm having troubles getting the
indentation to work correctly, and was hoping someone could point out
the right direction to go. My definitions go as follows:
(define-skeleton my-skel-c-if-stmt
"Insert an if statement template."
nil
>"if ( " _ " )"?\n
>"{"?\n
?\n
>"}"?\n
)
(define-abbrev c++-mode-abbrev-table "if" "" my-skel-c-if-stmt)o
Given my current cc-mode setup, my if's should look like
main( )
{
if ( )
{
}
// but what I end up with is:
if ( )
{
}
}
I've tried various combinations of >, \n and ?\n, but with no luck so
far. Can anyone see a way to fix this?
Thanks,
Gabriel
gabriel@apple.com