From: Stefan Monnier <monnier@iro.umontreal.ca>
To: martin rudalics <rudalics@gmx.at>
Cc: bug-gnu-emacs@gnu.org, Joe Wells <jbw@macs.hw.ac.uk>
Subject: Re: parentheses matching failure on valid sexp
Date: Tue, 11 Sep 2007 08:55:28 -0400 [thread overview]
Message-ID: <jwvmyvt4b5a.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <46E639B1.6010105@gmx.at> (martin rudalics's message of "Tue\, 11 Sep 2007 08\:46\:09 +0200")
>> 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
prev parent reply other threads:[~2007-09-11 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 5:24 parentheses matching failure on valid sexp Joe Wells
2007-09-11 5:59 ` Sven Joachim
2007-09-11 7:03 ` Joe Wells
2007-09-11 7:07 ` Joe Wells
2007-09-13 6:40 ` Andreas Röhler
2007-09-11 6:46 ` martin rudalics
2007-09-11 12:55 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmyvt4b5a.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=bug-gnu-emacs@gnu.org \
--cc=jbw@macs.hw.ac.uk \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.