[Top][All Lists]

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

What's the best (i.e. least bad) way to re-redisplay?

From: Alan Mackenzie
Subject: What's the best (i.e. least bad) way to re-redisplay?
Date: Mon, 23 Aug 2021 18:41:59 +0000

Hello, Emacs.

I'm currently thinking about issues raised in the thread "cc-mode
fontification feels random" in June.

I envisage a situation where an identifier is identified as a type during
jit-lock fontification, and thus font-lock-type-face needs to be applied
to all occurrences of this identifier.

The problem is, there will be occurences in the foreground window before
the one which triggered the fontification.  Redisplay will already have
passed this earlier buffer position.  So I need to trigger another
redisplay immediately after the current one.

What is the least bad way of doing this?

Currently, I'm thinking of something like the CC Mode fontification
functions setting a flag, and a repeating timer function testing this
flag every 0.025s, say, and triggering a redisplay if it's set.

One problem is knowing whether or not redisplay is currently active.  Is
there a simple way to do this in Lisp?  (I know there is in C.)

I surely can't be the first person needing to do this sort of thing.
Suggestions and comments, please, from the wise.  :-)

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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