From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mark Mynsted Newsgroups: gmane.emacs.help Subject: Re: Slickedit features in Emacs? Date: 22 May 2003 15:52:14 -0500 Organization: Uncle John's Band Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87e77d96.0305211059.3e15858a@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053637318 25438 80.91.224.249 (22 May 2003 21:01:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 May 2003 21:01:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 22 23:01:55 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19IxC3-0006bE-00 for ; Thu, 22 May 2003 23:01:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Ix7D-0006Z2-5h for gnu-help-gnu-emacs@m.gmane.org; Thu, 22 May 2003 16:56:43 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!204.68.152.1!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: 204.68.152.1 Original-X-Trace: fu-berlin.de 1053636736 533431 204.68.152.1 (16 [148877]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:113570 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10066 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10066 >>>>> "Peter" == Peter Lee 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. / \