From: Ralf Angeli <angeli@caeruleus.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Excessive refontification when setting jit-lock-context-unfontify-pos
Date: Fri, 27 Apr 2007 23:11:35 +0200 [thread overview]
Message-ID: <873b2la5fc.fsf@neutrino.caeruleus.net> (raw)
In-Reply-To: <jwvy7kdekcq.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri\, 27 Apr 2007 14\:54\:00 -0400")
* Stefan Monnier (2007-04-27) writes:
>> When typing `C-l' highlighting appears. Is there a possibility to
>> enforce such redisplay in an efficient way? I could probably call
>> `sit-for' somewhere in the code but I am not sure if this would be the
>> right way.
>
> I understand the problem, then. Your code is working fine, it's just that
> some part of the text your re-highlight is re-highlighted by jit-lock but
> *after* having been rendered by the redisplay engine.
> Typically it works like this:
[...]
Thanks very much for the explanations.
> So in your case you can either use
> jit-lock-after-change-extend-region-functions;
Unfortunately this hook is not available in Emacs 21.
> or you can use a similar
> run-with-timer in your font-lock-fontify-region-function. If you look at
> jit-lock-force-redisplay, you'll see that it should not cause infinite
> looping because it only causes redisplay (like C-l would) but not
> re-highlighting.
This is probably the way to go. I tried this and it works very well.
(For Emacs 21 I put the contents of `jit-lock-force-redisplay' into an
anonymous function passed to `run-with-timer'.)
> In Emacs>22 we should fix the font-lock/jit-lock interface so that jit-lock
> can handle this case automatically.
That would be nice, yes. For now I am relieved that this could be
solved from within AUCTeX as well.
Thank you very much for your valuable help.
--
Ralf
next prev parent reply other threads:[~2007-04-27 21:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-23 19:44 Excessive refontification when setting jit-lock-context-unfontify-pos Ralf Angeli
2007-04-24 8:33 ` martin rudalics
2007-04-24 18:16 ` Ralf Angeli
2007-04-24 20:56 ` martin rudalics
2007-04-24 21:25 ` Ralf Angeli
2007-04-24 14:18 ` Stefan Monnier
2007-04-24 18:31 ` Ralf Angeli
2007-04-24 20:41 ` Stefan Monnier
2007-04-24 21:20 ` Ralf Angeli
2007-04-25 4:22 ` Stefan Monnier
2007-04-25 6:34 ` Ralf Angeli
2007-04-25 7:28 ` Stefan Monnier
2007-04-27 17:53 ` Ralf Angeli
2007-04-27 18:54 ` Stefan Monnier
2007-04-27 21:11 ` Ralf Angeli [this message]
2007-04-28 15:27 ` Ralf Angeli
2007-04-30 0:23 ` Stefan Monnier
2007-04-30 6:33 ` Ralf Angeli
2007-04-25 8:18 ` martin rudalics
2007-04-27 18:02 ` Ralf Angeli
2007-04-25 8:27 ` martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873b2la5fc.fsf@neutrino.caeruleus.net \
--to=angeli@caeruleus.net \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).