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 10:24:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Here's what I put in my init file:

>   (define-abbrev-table 'global-abbrev-table '(
>                                               ("$->" "→")
>                                               ("$=>" "⇒")
>                                               ("$foo" "X")
>                                               )
>     "custom abbrev table"
>     :regexp (rx (or bos bol space) (group (+ (not space)))))
>   (setq save-abbrevs nil)
>   (setq-default abbrev-mode t)

> But only the $foo substitution works and I can't figure out why.

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


        Stefan




reply via email to

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