emacs-devel
[Top][All Lists]
Advanced

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

Re: Advising in cc-awk.el and namespace


From: Richard Stallman
Subject: Re: Advising in cc-awk.el and namespace
Date: Sat, 12 Jul 2003 01:32:34 -0400

    A change at pos N potentially changes the output of syntax-ppss for
    all pos>N, so jit-lock just refontifies everything (in the background
    with jit-lock-stealth-*).  Of course, in practice the output of
    syntax-ppss is generally not changed for all pos>N but only for N<pos<M
    (or sometimes it is changed for all pos>N but the change is marginal or
    irrelevant and will not influence the result of font-locking), so we could
    be more clever, but we would need to cache the parse-state-before-change
    so we can compare it to the parse-state-after-change so we can stop when
    they are equal again.

It would not be hard to cache the syntactic state every N lines in a
text property, and that way it would be possible to notice when
things get back in sync and end refontification.

However, another solution is to stop refontifying at the next
start-of-defun after the last change.  That should be really simple.
Could someone give that a try?





reply via email to

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