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

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

Re: Slickedit features in Emacs?


From: Mark Mynsted
Subject: Re: Slickedit features in Emacs?
Date: 22 May 2003 15:52:14 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Peter" == Peter Lee <address@hidden> writes:
Peter> Thanks for the reply Mark.  I changed the define to be:
Peter> (define-abbrev c++-mode-abbrev-table "ifx" "" 'my-skeleton-c-if)

Peter> It now works.  Do you know of a way to map these to multiple modes?  I
Peter> know there is a c-mode-common-hook that works for both c and c++, I
Peter> was wondering if there's something similar for c-mode-abbrev-table
Peter> (something like a c-mode-common-abbrev-table).

There are a few ways I think.

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

- You could add it to the global abbrev table, global-abbrev-table,
but then it would be global, which I think would not be something that
one would want.

- You could simply add it to each of your c-like modes when the
c-mode-common-hook is called.  But of course you would need to know
what modes you use...


-- 
-MM
I rarely read email from this address          /"\
because of spam.                               \ /     ASCII Ribbon Campaign
I MAY see it if you put #NOTSPAM#               X      Against HTML Mail
in the subject line.                           / \


reply via email to

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