help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using punctuation in abbrev


From: Stefan Monnier
Subject: Re: Using punctuation in abbrev
Date: Sun, 02 Jun 2013 13:56:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> Actually, if you call M-x expand-abbrev RET explicitly, you'll see they
>> all work.  What doesn't work for the first two is the "press space after
>> it to cause expansion", because this is only performed right after
>> a word char (hence it works for "$foo" because the last char is a word
>> char).
> I see, thanks.
> I've just looked at it: it's done in src/cmds.c:434 so behavior can't
> be changed from Lisp, too bad.

The code that calls expand-abbrev from self-insert-command is indeed in
C, so you can't change it from Elisp, but that code also runs
post-self-insert-hook, so you can add a function to that hook which will
call expand-abbrev for the missing case.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]