From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: good "modern" example code for a programming-language mode? Date: Wed, 16 Feb 2011 11:19:43 +0100 Message-ID: <87wrl01dts.fsf@engster.org> References: <87d3mtc4zw.fsf@maru.md5i.com> <87zkpwztya.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297851653 27004 80.91.229.12 (16 Feb 2011 10:20:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Feb 2011 10:20:53 +0000 (UTC) Cc: Michael Welsh Duggan , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 16 11:20:49 2011 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.69) (envelope-from ) id 1PpeV6-0001DA-Rz for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 11:20:49 +0100 Original-Received: from localhost ([127.0.0.1]:45679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpeV6-0004Ad-85 for ged-emacs-devel@m.gmane.org; Wed, 16 Feb 2011 05:20:48 -0500 Original-Received: from [140.186.70.92] (port=43571 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpeV0-0004AI-3f for emacs-devel@gnu.org; Wed, 16 Feb 2011 05:20:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpeUy-0005rz-S4 for emacs-devel@gnu.org; Wed, 16 Feb 2011 05:20:41 -0500 Original-Received: from v3-1008.vxen.de ([79.140.41.8]:55303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpeUy-0005qJ-NB; Wed, 16 Feb 2011 05:20:40 -0500 Original-Received: from dslc-082-082-180-097.pools.arcor-ip.net ([82.82.180.97] helo=spaten) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PpeUq-0004IU-RQ; Wed, 16 Feb 2011 11:20:32 +0100 In-Reply-To: <87zkpwztya.fsf@catnip.gol.com> (Miles Bader's message of "Wed, 16 Feb 2011 09:47:25 +0900") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) Mail-Followup-To: Miles Bader , Michael Welsh Duggan , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 79.140.41.8 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:136096 Archived-At: Miles Bader writes: > Michael Welsh Duggan writes: >> I don't have a good answer for you, but I'd like to see more new modes >> based the semantic library. It just seems like the right thing to do. > > Are there _any_ modes using it to handle "basic" language support > (indentation, highlighting)....? No. I also don't think that Semantic is well suited for that. As for highlighting, there's already the semantic-decorate minor mode which will highlight the semantical expressions found in the buffer. When activating it, you'll already see that Semantic doesn't parse the contents of functions, for example. It only parses (parts of) the contents when you're within that function, to determine the variables/types/etc. in the local scope. Regarding indentation: this is much more a matter of taste than semantics or syntax. If there was a direct connection between semantical analysis and indentation, why were all those wars fought for the "correct" indentation of C, for instance? Just looking at c-style-alist will make that clear. There's also a very good write-up regarding this issue from Steve Yegge when he dealt with indentation of Javascript: http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascript-mode-for-emacs.html -David