<div dir="ltr">Hello,<div><br></div><div>I'm trying to define some abbrevs for LaTeX commands.  However, if I try to define any abbrevs beginning with a '\' character, the abbrev is not completed when I type a space after the word.  I have included several examples from my abbrevs file below:</div>
<div><br></div><div><div>(define-abbrev-table 'text-mode-abbrev-table '(</div><div>    ("teh"  "the "  nil 0)</div><div>    ("\\c" "\\chapter{}" backward-char 0)</div><div>    ("\\i" "\\item" nil 0)</div>
<div>    ; abbreviations calling functions (which are defined in my-latex.el)</div><div>    ("\\ce" "" my-latex-center 0)</div><div>  ))</div><div><br></div><div>Of these examples, the first works fine in LaTeX mode.  However, none of the others produce any results when I type a space after the desired abbrev.  For example, "\c " will remain as "\c" and not expand to "\chapter{}" as desired.  I have tried altering the syntax of the abbrevs a bit.  If I remove one of the preceding slash characters, so the abbrev definition looks like "\c" "\\chapter{}" etc., the abbrev is inserted when I type "c " with no preceding slash.  Also, if I try to define an abbrev using the command line key sequence C-x a g, the resulting abbrev is still not functional.  For example, typing C-x a g after "\ref{}" and assigning the abbrev "\foo", I see a new line in my list of abbrevs that looks just like the ones above: ("\\foo" "\\ref{}" nil 0).  However, this abbrev, like the ones I have defined for myself, also fails.  It seems that Emacs doesn't know how to read its own syntax...?</div>
<div><br></div><div>I hope what I am trying to do is possible in Emacs, as it seems like fairly basic functionality.  If not, is there a better way to handle LaTeX completions in Emacs?</div><div><br></div><div>I'm using Aquamacs 1.5 running Emacs 22.3.2 (powerpc-apple-darwin9.5.0 Carbon version 1.6.0).  Please let me know if there is any other debugging information that might be useful.<br>
</div><div><br></div><div>Thanks very much,</div><div>Adrian</div></div></div>