unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ralf Angeli <angeli@caeruleus.net>
Cc: emacs-devel@gnu.org
Subject: Re: Excessive refontification when setting jit-lock-context-unfontify-pos
Date: Wed, 25 Apr 2007 00:22:20 -0400	[thread overview]
Message-ID: <jwvodld3x9z.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <877is1wjti.fsf@neutrino.caeruleus.net> (Ralf Angeli's message of "Tue\, 24 Apr 2007 23\:20\:41 +0200")

> j-l-c-u-p seemed to be the only mechanism working reliably.  In my
> f-l-fontify-region-function I tried to set the f-l-multiline and
> j-l-defer-multiline properties on the region in question which had no
> effect.

In your f-l-fontify-region-function, you should do what you'd otherwise do
in f-l-extend-region: i.e. extend the region.  No messing with
font-lock-multiline or other properties.  Just computing a new (larger)
region and passing that to f-l-default-fontify-region.

This is meant to make sure that if the region to highlight is part of
a larger multiline-element, it will be refontified in the proper context.

Then in font-lock-keywords, whenever you encounter a multiline element, you
want to mark it with the font-lock-multiline property.  This might work
automatically if you set the font-lock-multiline to t.

That should make sure that when a multiline element is later modified
(possibly turning it into something completely different), it is
completely refontified.

That should be enough to make it all work, regardless of the use of
jit-lock or even lazy-lock.

If it doesn't work, please give more details, including a sample session
where it fails and an explanation of how it fails.


        Stefan

  reply	other threads:[~2007-04-25  4:22 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 [this message]
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
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=jwvodld3x9z.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=angeli@caeruleus.net \
    --cc=emacs-devel@gnu.org \
    /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).