From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: parentheses matching failure on valid sexp Date: Tue, 11 Sep 2007 08:46:09 +0200 Message-ID: <46E639B1.6010105@gmx.at> References: <86fy1lojua.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1189496219 16369 80.91.229.12 (11 Sep 2007 07:36:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2007 07:36:59 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, Stefan Monnier To: Joe Wells Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 11 17:36:38 2007 Return-path: Envelope-to: geb-bug-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 1IV7mT-0007mS-MP for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 17:36:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV0IB-0002NC-J0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 03:36:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IV0He-00028g-09 for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 03:35:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IV0Ha-00027U-PW for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 03:35:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV0Ha-00027R-Jx for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 03:35:38 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IV0Ha-0001ce-3w for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 03:35:38 -0400 Original-Received: (qmail invoked by alias); 11 Sep 2007 07:08:55 -0000 Original-Received: from N712P030.adsl.highway.telekom.at (EHLO [62.47.32.254]) [62.47.32.254] by mail.gmx.net (mp004) with SMTP; 11 Sep 2007 09:08:55 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+CkHpa0tuCJEzXQ7eZsfFyPODZXSwHjBABvJdTXr TclG/3sd463Lkb User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <86fy1lojua.fsf@macs.hw.ac.uk> X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16537 Archived-At: > This bug is sensitive to the size of the input. If you delete much of > the input, then the bug goes away. Emacs reports a bug because the matching left paren is more than `blink-matching-paren-distance' characters before the right one. The message will go away if you customize that variable accordingly. It might be worth looking at the syntax-ppss cache for paren matching. I know, the paren matching algorithms usually find a matching paren within a few characters distance and there's no profound reason to do that. But when font-locking is on, the cache contains the position of all open parens for some line-beginning before point anyway. Hence, we could look for an opening paren within one or two lines and consult the cache if we didn't find anything useful there. In this case we could ignore `blink-matching-paren-distance'. Stefan what do you think?