From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#341: c-indent-command misindents? Date: Mon, 11 Jan 2016 13:35:48 +0000 Message-ID: <20160111133548.GA11318__47168.8754427761$1452519332$gmane$org@acm.fritz.box> References: <5712ce4f0805310813oea4c69bub98e6bc1f5877943@mail.gmail.com> <20151229203307.GC1884@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1452519332 16140 80.91.229.3 (11 Jan 2016 13:35:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2016 13:35:32 +0000 (UTC) Cc: Ralovich@debbugs.gnu.org, 341@debbugs.gnu.org, =?UTF-8?Q?Krist=C3=B3f?= To: Andrew Hyatt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 11 14:35:15 2016 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 1aIccs-0001Wj-Oi for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 14:35:15 +0100 Original-Received: from localhost ([::1]:54211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIccn-0004PH-6T for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 08:35:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcbo-00034q-D6 for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 08:34:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIcbi-0006oN-CC for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 08:34:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIcbi-0006oJ-9t; Mon, 11 Jan 2016 08:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aIcbi-00081r-2x; Mon, 11 Jan 2016 08:34: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 Jan 2016 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 341 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: wontfix Original-Received: via spool by 341-submit@debbugs.gnu.org id=B341.145251921130824 (code B ref 341); Mon, 11 Jan 2016 13:34:02 +0000 Original-Received: (at 341) by debbugs.gnu.org; 11 Jan 2016 13:33:31 +0000 Original-Received: from localhost ([127.0.0.1]:46027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIcbD-000816-53 for submit@debbugs.gnu.org; Mon, 11 Jan 2016 08:33:31 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:44780) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIcbB-00080v-7M for 341@debbugs.gnu.org; Mon, 11 Jan 2016 08:33:29 -0500 Original-Received: (qmail 23902 invoked by uid 3782); 11 Jan 2016 13:33:28 -0000 Original-Received: from acm.muc.de (p5B1460B3.dip0.t-ipconnect.de [91.20.96.179]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 11 Jan 2016 14:33:27 +0100 Original-Received: (qmail 12509 invoked by uid 1000); 11 Jan 2016 13:35:49 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: 208.118.235.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:111494 Archived-At: Hello, Andrew. On Sun, Jan 10, 2016 at 10:12:40PM -0500, Andrew Hyatt wrote: > Andrew Hyatt writes: > > On Tue, Dec 29, 2015 at 3:30 PM Alan Mackenzie wrote: > > Hello Andrew and Kristóf. > > On Mon, Dec 28, 2015 at 07:48:22PM -0500, Andrew Hyatt wrote: > > > I've reproduced this bug in emacs 25. > > > It seems like a real problem, thanks (belatedly) for reporting! > > Yes, it's a known problem in CC Mode, and it's seriously difficult to > > fix. Parsing happens mainly in the backwards direction, and in general, > > the #ifdefs in a file form a tree structure. Which is the line previous > > to line 6? It could be L4, it could be L2. Typically, such "parallel" > > text lines aren't nice and compatible, the way they are in this example. > > Indeed, it's possible to construct an example where L6 has two > > alternative syntactic contexts, depending on whether A is defined. In > > fact, something like: > > #ifdef A > > int foo(int a, int b) > > #else > > int bar(int a, int b) > > { > > if (a > b) > > #endif > > { > > return a+b; > > } > > would do it. > > I don't know if this problem will ever be fixed. > > Perhaps the right thing to do is to mark it as "wontfix" since it's > > unlikely to be possible without a big rewrite. What do you think? > I'm going to go ahead and do that, due to lack of opposition. Please > unmark or just let me know if you disagree. Yes, I suppose that's the best thing to do, although I'm ambivalent about it. Maybe sometime in the distant future there will perhaps be extra support in the syntax functionality which would make a fix for this easier to design and implement. Maybe. . So, yes, please go ahead and close it as "won't fix". [ .... ] -- Alan Mackenzie (Nuremberg, Germany).