[OS X Emacs] Abbrevs with '\' character don't work in Aquamacs 1.5

Adrian adrian.down at gmail.com
Wed Oct 8 17:29:10 EDT 2008


Hello,
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:

(define-abbrev-table 'text-mode-abbrev-table '(
    ("teh"  "the "  nil 0)
    ("\\c" "\\chapter{}" backward-char 0)
    ("\\i" "\\item" nil 0)
    ; abbreviations calling functions (which are defined in my-latex.el)
    ("\\ce" "" my-latex-center 0)
  ))

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...?

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?

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.

Thanks very much,
Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20081008/2c7ded93/attachment.html>


More information about the MacOSX-Emacs mailing list