From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: first-class support for csharp in cc-mode.el Date: Wed, 30 Dec 2009 15:19:45 +0000 Message-ID: <20091230151945.GA8767@muc.de> References: <4B39DD6E.1070204@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262186044 22317 80.91.229.12 (30 Dec 2009 15:14:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2009 15:14:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: dino chiesa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 30 16:13:56 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NQ0FG-0007Mn-6v for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 16:13:54 +0100 Original-Received: from localhost ([127.0.0.1]:43655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ0FG-0002xL-DF for ged-emacs-devel@m.gmane.org; Wed, 30 Dec 2009 10:13:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQ0FA-0002vB-C5 for emacs-devel@gnu.org; Wed, 30 Dec 2009 10:13:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQ0F4-0002pC-Ek for emacs-devel@gnu.org; Wed, 30 Dec 2009 10:13:46 -0500 Original-Received: from [199.232.76.173] (port=36533 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQ0F4-0002p8-5V for emacs-devel@gnu.org; Wed, 30 Dec 2009 10:13:42 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:2869 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQ0F3-0000E3-LC for emacs-devel@gnu.org; Wed, 30 Dec 2009 10:13:42 -0500 Original-Received: (qmail 95202 invoked by uid 3782); 30 Dec 2009 15:13:39 -0000 Original-Received: from acm.muc.de (pD9E502E1.dip.t-dialin.net [217.229.2.225]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 30 Dec 2009 16:13:38 +0100 Original-Received: (qmail 9072 invoked by uid 1000); 30 Dec 2009 15:19:45 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119045 Archived-At: Hi, Dino, I'm the current maintainer of CC Mode. On Tue, Dec 29, 2009 at 09:01:00PM -0800, dino chiesa wrote: > I don't have much experience with emacs-devel, but what would it take > to get csharp to be supported as a first-class (built-in) language in > cc-mode? The current policy is not to add any more languages to the core of CC Mode, since it's hassle enough supporting the seven that are already there. There are certainly lots of users of C, C++, Java, several users of Objective C and AWK, but I just don't know about Pike and IDL. The problem is, when somebody implements support for a language directly in CC Mode and they move on a few years later, support for that langauge effectively vanishes. It was to fix this that Martin Stjernholm (my predecessor) implemented the c-lang-const mechanism. > The stuff done to support it in > http://www.emacswiki.org/emacs/CSharpMode is all via documented > cc-mode c-lang-const things, and it seems to me these could be folded > into the cc-mode code without disturbing support for C/C++, Java, or > other cc-mode languages. I would guess that more emacs people are > using C# these days than CORBA IDL, which is supported in cc-mode. If the c-lang-const stuff is inadequate to support, say, C#, then I would prefer to amend CC Mode so that C# can be supported. It looks like the @"....." syntax will need such an amendment. This will probably involve a large change, since the use of \ as an escape character is firmly embedded in the very fabric of CC Mode. Is @ used for anything else in C#? Is it forbidden to have whitespace between @ and "? In fact, I've just thought of a way of fixing this: in an after-change function, splat the syntax (using syntax-table text-properties) of anything within @"....". I think there's already a suitable hook in CC Mode for this. > I have no idea if this is a friendly proposal or not, but it would > make things nice for people who write C# and use emacs. Thanks for the proposal! Constructive suggestions are always welcome at CC Mode. By the way, CC Mode has its own mailing list at bug-cc-mode@gnu.org and is hosted on sourceforge for historical reasons. > There are still a few issues with that C# mode - lambdas have no > special support, and the new dynamic keyword in .NET 4.0 isn't there > (simple to add), and there is the literal string thing I described in > my other mail thread - but mostly it works well. Including this would > provide a good baseline of support in emacs for C#. Those are all issues for C# Mode's maintainer. > -Dino -- Alan Mackenzie (Nuremberg, Germany).