From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: good "modern" example code for a programming-language mode? Date: Tue, 15 Feb 2011 12:43:33 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297791836 30709 80.91.229.12 (15 Feb 2011 17:43:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 17:43:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 15 18:43:52 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 1PpOwJ-0000ht-FW for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2011 18:43:51 +0100 Original-Received: from localhost ([127.0.0.1]:52550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpOwE-0000b0-0T for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2011 12:43:46 -0500 Original-Received: from [140.186.70.92] (port=54651 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpOw5-0000Z4-0O for emacs-devel@gnu.org; Tue, 15 Feb 2011 12:43:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpOw3-0000HT-Mw for emacs-devel@gnu.org; Tue, 15 Feb 2011 12:43:36 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:20160 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpOw3-0000H2-G0; Tue, 15 Feb 2011 12:43:35 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEADlKWk1MCqmX/2dsb2JhbAClWXS8SYVeBIUFjz4 X-IronPort-AV: E=Sophos;i="4.60,475,1291611600"; d="scan'208";a="91800465" Original-Received: from 76-10-169-151.dsl.teksavvy.com (HELO ceviche.home) ([76.10.169.151]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 15 Feb 2011 12:43:33 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7A60066188; Tue, 15 Feb 2011 12:43:33 -0500 (EST) In-Reply-To: (Miles Bader's message of "Tue, 15 Feb 2011 09:11:29 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:136055 Archived-At: > Does anyone have any suggestions for an Emacs programming-language > mode implementation that makes good use of "modern" Emacs features > (font-lock, syntax-ppss, etc) to do indentation/syntax-highlighting > (for a language that has at least somewhat complicated features like > multiple-line comments with multiple-character comment delimiters), > etc? > I'd like to read some code to see how these features are used in practice. I've used octave-mod.el as a testbed for the new SMIE stuff, so it's probably worth looking at it. The sad thing is that outline-mod.el included a lot more to start with, and some of hit has been replaced by the SMIE features, but not all of it (some more could be removed, I guess), so it's fairly large and I don't recommend to treat all of it as a good example. Maybe a cleaner example for SMIE would be modula2.el since that mode did not provide any feature (or close enough), so it's still very lean. Stefan