all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: abbrev-mode and skeletons question
Date: Fri, 24 Oct 2008 12:19:13 -0700 (PDT)	[thread overview]
Message-ID: <14ba3a8e-8cd1-47fc-a5ba-d88ede2a26b2@g25g2000prf.googlegroups.com> (raw)
In-Reply-To: mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org

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	other threads:[~2008-10-24 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1918.1224780687.25473.help-gnu-emacs@gnu.org>
2008-10-24 19:19 ` Xah [this message]
2008-10-25  0:33 ` abbrev-mode and skeletons question Chetan
2008-10-23 16:51 pandagoat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14ba3a8e-8cd1-47fc-a5ba-d88ede2a26b2@g25g2000prf.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.