all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: checking jit-lock-defer-multiline
Date: Tue, 25 Oct 2005 14:34:02 +0200	[thread overview]
Message-ID: <435E263A.1090104@gmx.at> (raw)
In-Reply-To: <87ek6batq8.fsf-monnier+emacs@gnu.org>

 > Could you give some example (concrete or hypothetical) where the
 > problem you mention comes up?

I'm looking for a practical font-lock-multiline substitute.  I dislike
font-lock-multiline because it may introduce too much overhead during
typing, especially when the multiline property spans a couple of lines.
Using jit-lock-defer-multiline should ideally resolve this because it's
processed when I don't type.

Now suppose I set a jit-lock-defer-multiline property from the beginning
of foo till the end of bar as in

foo
...
bar

The property would get assigned iff foo is textually followed by bar on
some line below.  If some user changes bar to baz I would have to act in
some way and the jit-lock-defer-multiline should help me to rescan the
text from foo till baz.  With the recent change the following might
happen: If the user replaces bar by baz _and_ inserts some text on the
line below baz, redisplay would call to fontify these lines "as usual".
jit-lock-context-fontify, on the other hand, would eventually refontify
from a position below these lines.  Refontification would not see foo in
either case.

However, I believe the extra variable is not needed.  The following should
suffice:

            (when (and jit-lock-context-unfontify-pos
                       (< jit-lock-context-unfontify-pos next)
                       (>= jit-lock-context-unfontify-pos start)
                       (not (get-text-property start 'jit-lock-defer-multiline)))
              (setq jit-lock-context-unfontify-pos next))

  reply	other threads:[~2005-10-25 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24  8:18 checking jit-lock-defer-multiline martin rudalics
2005-10-24 14:14 ` Stefan Monnier
2005-10-25 12:34   ` martin rudalics [this message]
2005-10-25 15:16     ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=435E263A.1090104@gmx.at \
    --to=rudalics@gmx.at \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.