emacs-devel
[Top][All Lists]
Advanced

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

RE: jit lock sit-for provokes redisplay provokes imenu


From: Drew Adams
Subject: RE: jit lock sit-for provokes redisplay provokes imenu
Date: Thu, 20 Jul 2006 12:47:21 -0700

        After ~30s of idle time, I see imenu-update-menubar being called
        continuously by emacs.  At a guess, imenu is being triggered because
        jit-lock has kicked in.

    That seems plausible.  Jit-lock does fontification by adding text
    properties, and that modifies the buffer, so that the subsequent
    redisplay will call imenu-update-menubar.

    The obvious way to solve this is to add a feature that enables
    imenu-update-menubar to determine that there have been no changes
    except in text properties.  Then it could return without really doing
    anything.

    It could be a function buffer-chars-modified-tick,
    which records the value of buffer-modified-tick as of the last
    change in the characters in the buffer.

I don't really mean to meddle here, but we talked about distinguishing text
changes from things like text-properties changes, for purposes of undo and
indicating buffer modification in the mode line - after the release.

It sounds like this problem could perhaps reuse a predicate that tells
whether buffer text was modified (as opposed to just text properties), once
that is implemented (after the release).

If so, you might want to make a note of that, and revisit the fix to this
problem later, so it uses the generic predicate.





reply via email to

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