GNU bug report logs -
#11448
24.1.50; Strange indentation level in C macro
Previous Next
Reported by: mwd <at> md5i.com
Date: Thu, 10 May 2012 21:48:01 UTC
Severity: normal
Found in version 24.1.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 11448 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hi, Michael!
>
> On Thu, May 30, 2013 at 10:46:20PM -0400, Michael Welsh Duggan wrote:
>> I'd like to bump this issue.
>
> Sorry, I missed this one last year.
>
>> I looked into it a little, and it looks like several of the macros
>> before the point in question are being marked as c-in-sws, which
>> doesn't seem right to me. The code ends up evaluating
>> `c-beginning-of-macro' in a buffer that is narrowed such that the
>> beginning of the macro that it is trying to find the beginning of is
>> cut off.
>
> Yes, sort of. I think the c-in-sws properties are right.
>
> What I think is throwing it off is the calculation of a search limit
> (effectively a buffer narrowing) in `c-guess-basic-syntax'. That limit
> was erroneously at a random position, but it actually needs to be at a
> "syntactically neutral" position.
>
> I put that limit calculation in as part of a large optimisation for a
> ~3,500 line macro which was causing scrolling to go very slowly. Taking
> it out again doesn't seem to slow it down all that badly. So, out it
> comes!
>
>> The resulting indentation problem isn't horrible, but the bug that leads
>> to this problem is subtle enough that it could be causing other problems
>> in similar situations.
>
> Yes. Thanks for the bug report. Could you try out this patch please.
> I think it fixes the bug:
Seems to work for me. Thanks!
--
Michael Duggan
This bug report was last modified 12 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.