From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: How to prevent font-lock (& jit-lock etc.) from refontifying?
Date: Wed, 13 Oct 2004 21:20:05 GMT [thread overview]
Message-ID: <jwv655egvzt.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.2867.1097623015.2017.help-gnu-emacs@gnu.org
> In Emacs 20, I only had to worry about lazy-lock doing this, and function
> lazy-lock-after-fontify-buffer was available to convince lazy-lock not to
> undo things behind my back. I could just call that function after
> highlighting, to fool lazy-lock into thinking there was no need to
> rehighlight. This function, lock-after-fontify-buffer, is still available in
> Emacs 21.
Such a hack will not prevent future re-highlighting (e.g. if you later on
make a change on the same line). If that's good enough, then just do:
(let ((inhibit-modification-hooks t))
(put-text-property start end 'face 'toto))
> Please don't reply that I should just use font-lock-keywords and let
> font-lock do the highlighting. Assume that there is a reason I want to add
> some-face as the 'face property using put-text-property. Thanks.
Without knowing the reason why you want to do it, I can't give you a good
answer.
Stefan
next parent reply other threads:[~2004-10-13 21:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2867.1097623015.2017.help-gnu-emacs@gnu.org>
2004-10-13 21:20 ` Stefan Monnier [this message]
2004-10-13 22:07 ` How to prevent font-lock (& jit-lock etc.) from refontifying? Drew Adams
2004-10-13 22:55 ` Stefan Monnier
[not found] <mailman.3061.1097688611.2017.help-gnu-emacs@gnu.org>
2004-10-13 18:32 ` Oliver Scholz
2004-10-12 19:51 Drew Adams
2004-10-12 20:27 ` Drew Adams
2004-10-13 10:06 ` Sacha Chua
[not found] ` <mailman.2950.1097663332.2017.help-gnu-emacs@gnu.org>
2004-10-13 15:23 ` Kevin Rodgers
2004-10-13 17:22 ` Drew Adams
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=jwv655egvzt.fsf-monnier+gnu.emacs.help@gnu.org \
--to=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 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.