* abbrev-mode and skeletons question
@ 2008-10-23 16:51 pandagoat
0 siblings, 0 replies; 3+ messages in thread
From: pandagoat @ 2008-10-23 16:51 UTC (permalink / raw)
To: Help-gnu-emacs
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.
Thanks.
--
View this message in context: http://www.nabble.com/abbrev-mode-and-skeletons-question-tp20135119p20135119.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org>]
* Re: abbrev-mode and skeletons question
[not found] <mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org>
@ 2008-10-24 19:19 ` Xah
2008-10-25 0:33 ` Chetan
1 sibling, 0 replies; 3+ messages in thread
From: Xah @ 2008-10-24 19:19 UTC (permalink / raw)
To: help-gnu-emacs
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/
☄
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: abbrev-mode and skeletons question
[not found] <mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org>
2008-10-24 19:19 ` Xah
@ 2008-10-25 0:33 ` Chetan
1 sibling, 0 replies; 3+ messages in thread
From: Chetan @ 2008-10-25 0:33 UTC (permalink / raw)
To: help-gnu-emacs
pandagoat <pandagoat@gmail.com> writes:
> 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.
>
> Thanks.
I haven't used skeletons. But I have used expand package and it checks
for comments and strings.
Chetan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-25 0:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 16:51 abbrev-mode and skeletons question pandagoat
[not found] <mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org>
2008-10-24 19:19 ` Xah
2008-10-25 0:33 ` Chetan
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).