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: C Mode: acceleration in brace deserts. Date: Fri, 4 Dec 2009 11:37:26 +0000 Message-ID: <20091204113726.GA1456@muc.de> References: <20091203162129.GA1942@muc.de> <20091203165937.GB1942@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259926346 25627 80.91.229.12 (4 Dec 2009 11:32:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2009 11:32:26 +0000 (UTC) Cc: lennart.borgman@gmail.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 04 12:32:19 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 1NGWOY-00086u-5M for ged-emacs-devel@m.gmane.org; Fri, 04 Dec 2009 12:32:18 +0100 Original-Received: from localhost ([127.0.0.1]:46734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGWOX-0004zM-Fk for ged-emacs-devel@m.gmane.org; Fri, 04 Dec 2009 06:32:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGWOQ-0004xV-8J for emacs-devel@gnu.org; Fri, 04 Dec 2009 06:32:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGWOL-0004qD-8P for emacs-devel@gnu.org; Fri, 04 Dec 2009 06:32:09 -0500 Original-Received: from [199.232.76.173] (port=37114 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGWOK-0004q3-UZ for emacs-devel@gnu.org; Fri, 04 Dec 2009 06:32:04 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:4623 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 1NGWOK-0004fU-Cu for emacs-devel@gnu.org; Fri, 04 Dec 2009 06:32:04 -0500 Original-Received: (qmail 47092 invoked by uid 3782); 4 Dec 2009 11:32:02 -0000 Original-Received: from acm.muc.de (pD9E5155F.dip.t-dialin.net [217.229.21.95]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 04 Dec 2009 12:31:59 +0100 Original-Received: (qmail 1697 invoked by uid 1000); 4 Dec 2009 11:37:26 -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:118247 Archived-At: Hi, Richard, On Fri, Dec 04, 2009 at 12:31:10AM -0500, Richard Stallman wrote: > Short brusque answer: no - it[enhancement of c-parse-state]'s ~1300 > lines of code, much of it arcane. > Could it be rewritten into a modular facility? I'm not sure what you mean here. c-parse-state deals essentially with the braces and any "lesser" parens in "brace-block" languages, and it's tightly optimised, as tight as I could make it. It makes extensive use of brace/paren syntax (parse-partial-sexp and scan-lists) and plays dirty tricks with category text properties. Are you thinking of somehow parametrising it so that it could deal with "braces" which are, say, keyword tokens like Pascal's BEGIN and END? I think this would be possible, but not worthwhile - it would probably be better to write this from scratch, possibly along similar lines. -- Alan Mackenzie (Nuremberg, Germany).