From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juha Nieminen Newsgroups: gmane.emacs.help Subject: Re: Problem with parenthesis matching and autoindentation in MacOS X version of emacs Date: Thu, 18 Dec 2008 00:32:25 GMT Organization: Sonera Customer Message-ID: References: <49463d12$0$4789$9b536df3@news.fv.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229574192 18664 80.91.229.12 (18 Dec 2008 04:23:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2008 04:23:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 05:24:19 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LDAQo-00073D-WB for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Dec 2008 05:24:15 +0100 Original-Received: from localhost ([127.0.0.1]:54691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDAPc-0000W1-M1 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 23:23:00 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!switch.ch!newsfeed2.funet.fi!newsfeed1.funet.fi!newsfeeds.funet.fi!feeder1.news.saunalahti.fi!nntp.inet.fi!central1.inet.fi!inet.fi!read4.inet.fi.POSTED!53ab2750!not-for-mail User-Agent: Thunderbird 2.0.0.18 (X11/20081112) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-Enigmail-Version: 0.95.7 Original-Lines: 21 Original-NNTP-Posting-Host: 88.195.136.151 Original-X-Complaints-To: abuse@inet.fi Original-X-Trace: read4.inet.fi 1229560345 88.195.136.151 (Thu, 18 Dec 2008 02:32:25 EET) Original-NNTP-Posting-Date: Thu, 18 Dec 2008 02:32:25 EET Original-Xref: news.stanford.edu gnu.emacs.help:165431 X-Mailman-Approved-At: Wed, 17 Dec 2008 23:22:42 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60770 Archived-At: Alan Mackenzie wrote: >> Would it be a great loss if the <> "brackets" were not included in the >> matching logic at all? > > It would be a loss, yes. Maybe not that great, but it would be a loss in > consistency, since paren matching should match any sort of > parens/braces/brackets, etc. I know that the C++ language syntax is not a context-free grammar. In other words, the meaning of tokens (eg. the tokens < and >) cannot be deduced without the context. OTOH, it basically only makes the life of compilers and code editing software harder, not people writing C++. It *is* the duty of programs to do all the hard work, rather than leaving it to the user. :) OTOH, given that it's impossible to know the meaning of the < and > symbols in C++ without the full context, I assume it will be impossible to make any matching logic which would work in all cases. I don't really think it would be a huge loss if those were not included in the parenthesis matching rules.