yasnippet - Google Code
YASnippet is a template system for emacs. It allows you to type a abbrevation and automatically expand the abbreviation into function templates.via yasnippet - Google Code.Bundled language templates includes: C, C++, C#, Perl, Python, Ruby, SQL, LaTeX, HTML, CSS and more.
Yasnippet system is inspired from TextMate's template system. You can use a tool to import any TextMate template you have to YASnippet.