bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#341: c-indent-command misindents?


From: Alan Mackenzie
Subject: bug#341: c-indent-command misindents?
Date: Mon, 11 Jan 2016 13:35:48 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Andrew.

On Sun, Jan 10, 2016 at 10:12:40PM -0500, Andrew Hyatt wrote:
> Andrew Hyatt <ahyatt@gmail.com> writes:

> > On Tue, Dec 29, 2015 at 3:30 PM Alan Mackenzie <acm@muc.de> 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.  <Sigh>.

So, yes, please go ahead and close it as "won't fix".

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]