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

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

Re: abbrev-mode and skeletons question


From: Xah
Subject: Re: abbrev-mode and skeletons question
Date: Fri, 24 Oct 2008 12:19:13 -0700 (PDT)
User-agent: G2/1.0

On Oct 23, 9:51 am, pandagoat <pandag...@gmail.com> wrote:
> I have set up several skeletons to use when I type certain abbrevs, but I
> have two cases where I do not wish it to insert anything: in commented
> regions and in strings.  Is there some method to not insert a skeleton if
> the abbrev is in a commented region or in a string?
>
> I know I can just use cryptic abbrevs that I would never type otherwise, but
> doing the aforementioned method would be more nice.

i don't have clear answer for you, but i think there's no user level
way to do thaty. More specifically, abbrevs is not designed to be
context sensitive. (however, abbrev does has some mechanism to prevent
expansion while you are typing the word out. You have to type some
prefix... see the doc on abbrev)

To do what you want, i think you might need to use some skeleton mode
or ysnippet mode, which are designed to expand words to prog lang
templates, and is context sensitive.

  Xah
∑ http://xahlee.org/

reply via email to

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