emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#20352: Factor 2 slow down of font-locking in c-mode


From: Stefan Monnier
Subject: Re: bug#20352: Factor 2 slow down of font-locking in c-mode
Date: Sun, 03 May 2015 22:13:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Indeed.  Some while ago, you were musing on putting syntax-ppss, or
> equivalent, into syntax.c, thus rendering
> open-paren-in-column-0-is-defun-start unnecessary and obsolete.  This
> would speed up or improve the accuracy of, in particular, back_comment
> and the stacks of things which depend upon it.

> Is this enhancement still intended?

Not in the short term, no.  I've toyed with it, but there's a problem:
syntax-ppss's caching relies on the syntax-table being constant.
This usually works fine because the callers "know" to call syntax-ppss
outside of with-syntax-table (I guess in reality they don't really know,
but they happen to do that because they call syntax-ppss fairly early
on), but it's not uncommon for Elisp code (definitely including CC-mode)
to use with-syntax-table around calls to forward-sexp/comment, so
calling syntax-ppss implicitly from within those functions exposes this
underlying syntax-ppss limitation.

IOW, it can't be done until we figure out how to make syntax-ppss handle
syntax-table changes.


        Stefan



reply via email to

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