From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Lee Newsgroups: gmane.emacs.help Subject: Re: Defining syntactic symbols Date: Thu, 20 Mar 2003 23:08:55 GMT Organization: Prodigy Internet http://www.prodigy.com Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048201835 14962 80.91.224.249 (20 Mar 2003 23:10:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2003 23:10:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 00:10:32 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 18w9B9-0003sp-00 for ; Fri, 21 Mar 2003 00:10:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18w9B9-0005Iv-02 for gnu-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2003 18:10:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!207.115.63.142!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Original-NNTP-Posting-Host: 216.62.199.3 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr11.news.prodigy.com 1048201735 ST000 216.62.199.3 (Thu, 20 Mar 2003 18:08:55 EST) Original-NNTP-Posting-Date: Thu, 20 Mar 2003 18:08:55 EST X-UserInfo1: OH]YBTSEJCUYRTH]]ZN@_TDAYZOZ@GXOXZ^L\UQHWIWDUWYADNVOPCKZBL\NX_KHV^GY[KVMG^ZPNHSCZNS[^UXFJVWYXVXKBH[XRWWBBDTN@AX\JSBVH]_@T\EKJHBMZ\_WZJFNRY]YWKSPED_U^NC\HSZ\WS[KEAYI@DO@\K@BP\LD[\GTMPLDFVU]ASJM Original-Xref: shelby.stanford.edu gnu.emacs.help:111274 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:7774 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7774 Peter Lee writes: > Peter Lee writes: > > > I'm having a problem with cc-mode handling things macros inside class > > definitions such as DECLARE_MESSAGE_MAP(class). > > > > I'm having the same problem with csharp-mode and attributes such as > > [ComVisible(true)] > > [Guid("6674C3CF-1118-40f2-B7F2-CBA3D863082C")] > > > > Following either of these the indentation is off or in the case of > > csharp I get syntactic errors. > > > > If I put a semi-colon after the attributes or the macro's the problem > > goes away. > > > > I assume I need to extend cc-mode to handle this syntax, but I'm not > > sure how to go about it. > > I wanted to add that I'm using the following for csharp support: > > ;;; csharp-mode.el --- csharp-mode > ;; Authors: 2002 Dennis Haney > ;; 2000 Brad Merrill > ;; Version: 1.05 More info, I found the following in csharp-mode.el that looks to be what I need to change: (defconst c-Csharp-attrib-key (concat "\[" c-symbol-key "\\(([^)]*)\\)?\]")) (defconst c-Csharp-class-key (concat c-Csharp-attrib-key "\\(?:" "\\(" "new\\|" "public\\|" "protected\\|" "internal\\|" "private\\|" "abstract\\|" "sealed" "\\)" "\\s +\\)*" "\\(struct\\|class\\)\\s +" c-symbol-key ;name of the class "\\(\\s *:\\s *" c-symbol-key ;maybe followed by parent "\\(\\s *,\\s *" c-symbol-key "\\)*" "\\)?" )) I'm guessing I just need to change the regex for c-Csharp-attrib-key to be able to handle recognize: [ComVisible(true)] [Guid("6674C3CF-1118-40f2-B7F2-CBA3D863082C")] But all my attempts so far have not been successful. If any regex gurus out there can help it would be appreciated. Or is the completely wrong place to be doing this?