This is the setup I use for TeX'ing in Xemacs. It lets you define
abbreviations which either auto-expand to a given string and execute one Lisp command (move back one character, etc), or call a Lisp function that can do more
complicated things like insert a few lines, and move the cursor to where you want it. Annoyingly, when last I checked (GNU) Emacs does not
allow abbreviations to begin with '\'. I hope they change that someday.