From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#11749: Acknowledgement (24.1; C-mode indentation gives wrong-type-argument error.) Date: Tue, 23 Oct 2012 12:13:50 -0400 Message-ID: References: <50447C94.2040402@cua.dk> <20120905204821.GA3620@acm.acm> <87ipbqpkb7.fsf@maru.md5i.com> <20120908211451.GA22477@acm.acm> <20121007105951.GA3194@acm.acm> <20121010200025.GA3449@acm.acm> <20121014170650.GA3766@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351008871 18291 80.91.229.3 (23 Oct 2012 16:14:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 16:14:31 +0000 (UTC) Cc: "11749@debbugs.gnu.org" <11749@debbugs.gnu.org>, Kim Storm To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 18:14:38 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQh7k-0002wk-JX for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 18:14:36 +0200 Original-Received: from localhost ([::1]:55360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQh7d-0007HS-0d for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 12:14:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQh7Z-0007HG-N6 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 12:14:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQh7T-00060e-Up for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 12:14:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQh7J-0005qc-JI; Tue, 23 Oct 2012 12:14:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQh97-00043M-L7; Tue, 23 Oct 2012 12:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 23 Oct 2012 16:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11749 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 11749-submit@debbugs.gnu.org id=B11749.135100895515569 (code B ref 11749); Tue, 23 Oct 2012 16:16:01 +0000 Original-Received: (at 11749) by debbugs.gnu.org; 23 Oct 2012 16:15:55 +0000 Original-Received: from localhost ([127.0.0.1]:58005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQh91-000433-7i for submit@debbugs.gnu.org; Tue, 23 Oct 2012 12:15:55 -0400 Original-Received: from upton.red.cert.org ([192.88.209.60]:48518) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQh8y-00042q-R6 for 11749@debbugs.gnu.org; Tue, 23 Oct 2012 12:15:53 -0400 Original-Received: from bucknell.indigo.cert.org (bucknell.indigo.cert.org [10.60.10.121]) by upton.red.cert.org (8.14.4/8.14.4) with ESMTP id q9NGDpi6030584; Tue, 23 Oct 2012 12:13:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cert.org; s=jthatj15xw2j; t=1351008831; bh=8IlSlIAw4uyXq0v5T1YS5NikbD4xpr7cKAKrZMkFANM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type:Sender:Reply-To; b=C1bggpWgX+SGxA8aUAX9xsS9Ti025Q42A1i2kVfgpCmjCXRApSuDpQU5y8Svai88Y hcsL9TNiN/JKdLi7h/8IMynIZwCm9GyYEzNk4v0AzY5HYoIG+8pTlws/xERe1vwy31 1hwVn/Iu0ZwODeXC+VpfSu8uUxqeclUJqll5ox2k= Original-Received: from waterbuck.yellow.cert.org (waterbuck.yellow.cert.org [10.20.128.84]) by bucknell.indigo.cert.org (8.14.4/8.14.4/2.81) with ESMTP id q9NGDpnj001622; Tue, 23 Oct 2012 12:13:51 -0400 Original-Received: (from mwd@localhost) by waterbuck.yellow.cert.org (8.14.4/8.14.4/Submit/1.6) id q9NGDoST026861; Tue, 23 Oct 2012 12:13:50 -0400 X-Authentication-Warning: waterbuck.yellow.cert.org: mwd set sender to mwd@cert.org using -f In-Reply-To: <20121014170650.GA3766@acm.acm> (Alan Mackenzie's message of "Sun, 14 Oct 2012 13:06:50 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65923 Archived-At: Alan Mackenzie writes: > Hi, Michael, > > On Wed, Oct 10, 2012 at 08:00:25PM +0000, Alan Mackenzie wrote: >> On Tue, Oct 09, 2012 at 10:05:07AM -0400, Michael Welsh Duggan wrote: >> > Alan Mackenzie writes: > > [ .... ] > >> > > I have found the bug which is causing (most of) these dings, though I >> > > don't think it is the one which caused Kim's original bug. Could you try >> > > out the patch below, please. (I have also enhanced/corrected the >> > > debugging routines a bit, too.) > >> > Still doesn't seem to help much here. I have attached a file which >> > reliably causes a cache failure. I have attached the smallest file of >> > the set of files I am working on that causes this particular problem. >> > Load the attached file and toggle on parse state debugging. Then scroll >> > to the bottom of the file. (Use C-v multiple times, or just M->.) One >> > reason I have attached this file is that it only triggers the warning >> > message once. Most of my larger files cause this to happen quite a lot. > >> What is happening in this file is another bug, arising from historical >> assumptions which are no longer valid. > >> The "from scratch" calculation notes that the starting scanning position >> would be a long way (>5000) back, hence it tries going back to the second >> "beginning-of-defun" to get a top-level starting point. This >> "beginning-of-defun" is a pure "brace in column zero" test. > >> This doesn't work in C++ when constructs inside a namespace have braces >> at column zero, something I believe has become very common in recent >> years. Namespaces didn't exist in C++ when c-parse-state was originally >> written. > >> Obviously this optimisation is no longer valid. I wouldn't be surprised >> if it has caused quite a bit of buggy behaviour. I'll need to think it >> over for a few days to decide what to do. > > The only reasonable thing to do is to disable the heuristic for C++ Mode. > This is what the patch below now does. Could you try it out as usual, > please. Thanks! Better, but doesn't solve all problems. I'll see if I can't find something reproducible for you. -- Michael Welsh Duggan (mwd@cert.org)