all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Lee <pete_lee@swbell.net>
Subject: Re: Slickedit features in Emacs?
Date: Fri, 23 May 2003 15:44:09 GMT	[thread overview]
Message-ID: <uu1blk6r6.fsf@swbell.net> (raw)
In-Reply-To: m2iss1u6j4.fsf@mmynsted.corp.vha.com

>>>>> "Mark" == Mark Mynsted <mmynsted_news@gbronline.com> writes:

>>>>> "Stefan" == Stefan Monnier
>>>>> <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
    >>> - There should be a way to capture the name of the mode using
    >>> mode-name from the hook added to 'c-mode-common-hook, such
    >>> that when the hook gets called it finds the name, translates
    >>> that to the correct abbrev table name then adds the abbrev to
    >>> the applicable table.  If you get that working, I would like
    >>> to use it myself.  :-)

    Stefan> What's wrong with `local-abbrev-table' ?

    Mark> That is great.  Now the following will work exactly as
    Mark> requested, i.e. it will work for any mode that triggers the
    Mark> c-mode-common-hook:

    Mark> (define-skeleton my-skeleton-c-if "Insert a c if statement"
    Mark> nil "if (" > _ ")" \n "{" '(indent-for-tab-command) \n \n
    Mark> "}" '(indent-for-tab-command))

    Mark> (defun my-c-mode-common-hook () (define-abbrev
    Mark> local-abbrev-table "ifx" "" 'my-skeleton-c-if)) (add-hook
    Mark> 'c-mode-common-hook 'my-c-mode-common-hook)

Ahhh that's what I was looking for... Thanks Stefan and Mark.

  reply	other threads:[~2003-05-23 15:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21 18:59 Slickedit features in Emacs? Henrik Jönsson
2003-05-21 19:08 ` Phillip Lord
2003-05-21 19:29 ` Benjamin Rutt
2003-05-22  7:07   ` Henrik Jönsson
2003-05-22 12:38     ` Bruce Ashfield
2003-05-22 14:14     ` Stefan Monnier
2003-05-22 17:12     ` Peter Lee
2003-05-22 19:42       ` Mark Mynsted
2003-05-22 20:04         ` Peter Lee
2003-05-22 20:23           ` Kai Großjohann
2003-05-22 20:52           ` Mark Mynsted
2003-05-22 21:03             ` Stefan Monnier
2003-05-23 13:38               ` Mark Mynsted
2003-05-23 15:44                 ` Peter Lee [this message]
2003-05-21 19:34 ` Peter Lee
2003-05-21 19:38 ` Burton Samograd
2003-05-21 20:30 ` Stefan Monnier
2003-05-22 13:56   ` Benjamin Rutt
2003-05-21 20:53 ` Ole Laursen
2003-05-22 15:31 ` Kai Großjohann

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=uu1blk6r6.fsf@swbell.net \
    --to=pete_lee@swbell.net \
    /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.