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

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

bug#11448: 24.1.50; Strange indentation level in C macro


From: Michael Welsh Duggan
Subject: bug#11448: 24.1.50; Strange indentation level in C macro
Date: Sat, 01 Jun 2013 22:51:53 -0400
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (darwin)

Alan Mackenzie <acm@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





reply via email to

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