From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#18072: 24.3; cc-mode indentation is broken Date: Mon, 11 Nov 2019 20:43:07 +0000 Message-ID: <20191111204307.GB5135@ACM> References: <53CD68CE.40805@gmail.com> <20191102122305.50439.qmail@mail.muc.de> <87y2wnsaeb.fsf@marxist.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="157069"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 18072@debbugs.gnu.org, Juhani =?UTF-8?Q?=C3=85hman?= To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 11 21:44:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUGXi-000ek8-HB for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 21:44:10 +0100 Original-Received: from localhost ([::1]:57036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUGXh-0003pz-Aw for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 15:44:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51117) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUGXb-0003pq-Bk for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 15:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUGXa-0005ne-D9 for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 15:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUGXa-0005na-A8; Mon, 11 Nov 2019 15:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iUGXa-0002WQ-6x; Mon, 11 Nov 2019 15:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 11 Nov 2019 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18072 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 18072-submit@debbugs.gnu.org id=B18072.15735049939632 (code B ref 18072); Mon, 11 Nov 2019 20:44:02 +0000 Original-Received: (at 18072) by debbugs.gnu.org; 11 Nov 2019 20:43:13 +0000 Original-Received: from localhost ([127.0.0.1]:56042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUGWm-0002VI-Qr for submit@debbugs.gnu.org; Mon, 11 Nov 2019 15:43:13 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:64504 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iUGWk-0002V9-Af for 18072@debbugs.gnu.org; Mon, 11 Nov 2019 15:43:11 -0500 Original-Received: (qmail 95457 invoked by uid 3782); 11 Nov 2019 20:43:08 -0000 Original-Received: from acm.muc.de (p4FE15B13.dip0.t-ipconnect.de [79.225.91.19]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 11 Nov 2019 21:43:07 +0100 Original-Received: (qmail 5154 invoked by uid 1000); 11 Nov 2019 20:43:07 -0000 Content-Disposition: inline In-Reply-To: <87y2wnsaeb.fsf@marxist.se> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:171441 Archived-At: Hello, Stefan. On Sun, Nov 10, 2019 at 22:13:00 +0100, Stefan Kangas wrote: > Hi Alan, > Alan Mackenzie writes: > > Is this C++ Mode, by any chance? > I'm not sure which one to use to reproduce it. I'm hoping Juhani will > be able to tell us. > > This looks like having the same cause as bug #37910 "CC Mode 5.33.2 > > (C++//l); CC-mode inconsistently indents everything as topmost-intro > > after a while". > > I'm pretty sure it's a defect in a particular CC Mode cache (the "state > > cache"), which tracks parentheses, braces, and brackets containing and > > near point. Somehow, it's missing the critical {, believing that > > foo();, etc., are at top level. A C-c C-s on that line would likely > > show "topmost-intro". > Do you think that these two bugs should be merged? I don't think the evidence is strong enough to do this, yet. Not quite. In the course of investigating #37910, I discovered a flaw whose effect would be consistent with what we're seeing in #37910 and the current bug. I intend to commit a fix to this flaw, soon. However, there's more to #37910 than just that flaw, so #37910 is where I'm spending my time at the moment. > Best regards, > Stefan Kangas -- Alan Mackenzie (Nuremberg, Germany).