*** M-x expand-add-abbrevs defines a special kind of abbrev which is
meant for programming constructs. These abbrevs expand like ordinary
ones, when you type SPC, but only at the end of a line and not within
strings or comments.
These abbrevs can act as templates: you can define places within an abbrev for insertion of additional text. Once you expand the abbrev, you can then use C-x a p and C-x a n to move back and forth to these insertion points. Thus you can conveniently insert additional text at these points.