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

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

Re: parentheses matching failure on valid sexp


From: Stefan Monnier
Subject: Re: parentheses matching failure on valid sexp
Date: Tue, 11 Sep 2007 08:55:28 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>> This bug is sensitive to the size of the input.  If you delete much of
>> the input, then the bug goes away.

> Emacs reports a bug because the matching left paren is more than
> `blink-matching-paren-distance' characters before the right one.  The
> message will go away if you customize that variable accordingly.

> It might be worth looking at the syntax-ppss cache for paren matching.
> I know, the paren matching algorithms usually find a matching paren
> within a few characters distance and there's no profound reason to do
> that.  But when font-locking is on, the cache contains the position of
> all open parens for some line-beginning before point anyway.  Hence, we
> could look for an opening paren within one or two lines and consult the
> cache if we didn't find anything useful there.  In this case we could
> ignore `blink-matching-paren-distance'.  Stefan what do you think?

I'm not sure syntax-ppss is such a great idea here.  I mean, maybe it'll
work, but we may as well just set `blink-matching-paren-distance' to nil.
The only time it's a problem is when you bump into an extraneous close
paren, in which case Emacs will scan all the way to the beginning of
the buffer.  But even then: unless your buffer is 200MB long, this is still
almost instantaneous, so it seems acceptable.


        Stefan




reply via email to

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