unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs abbreviation mode
@ 2007-06-10 16:02 Fabrizio Sidoli
  2007-06-10 23:27 ` Nikolaj Schumacher
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrizio Sidoli @ 2007-06-10 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hi there,

I'm not sure if this is the correct address to be sending this request to 
so please forgive me if it is not.

I was wondering if you could tell me why the following abbreviation for 
LaTex works under XEmacs but not under Emacs.


(define-abbrev-table 'tex-mode-abbrev-table '(
     ("\\ha" "{\\H$\\alpha$} " nil 0)
    .
    .
    .
))

In XEmacs, if I typed '\ha' I would get in return '{\H$\alpha$}', this 
does not seem to work in Emacs. Emacs appears not to like the abbreviation 
to have the special character '\'. In Emacs, the following does work 
however.

     ("ha" "{\\H$\\alpha$} " nil 0)

Note the absence of the first two '\'. I


Many thanks,
Fabrizio

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: emacs abbreviation mode
  2007-06-10 16:02 emacs abbreviation mode Fabrizio Sidoli
@ 2007-06-10 23:27 ` Nikolaj Schumacher
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolaj Schumacher @ 2007-06-10 23:27 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: Fabrizio Sidoli

Fabrizio Sidoli <fs@star.ucl.ac.uk> wrote:

> Emacs appears not to like the abbreviation to have the special
> character '\'.

I was bothered by this recently as well.  It appears Emacs just uses
characters with word-syntax (see `char-syntax') for abbreviations.

There are some advantages to this, for instance a closing ")" will also
trigger an expansion, because only the word before is looked up.
(Don't know how XEmacs handles that ...)

I currently defadvice expand-abbrev with a custom syntax-table to allow
more characters.  If anybody knows a cleaner way to tweak this, I'm
interested ...


regards,
Nikolaj Schumacher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-10 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-10 16:02 emacs abbreviation mode Fabrizio Sidoli
2007-06-10 23:27 ` Nikolaj Schumacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).