From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: command to fontify whole buffer?
Date: Fri, 23 Sep 2011 00:23:00 -0400 [thread overview]
Message-ID: <jwv62kjj3lb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8BFD7E6B15F149EA96503B2768DFD6C5@us.oracle.com> (Drew Adams's message of "Thu, 22 Sep 2011 06:32:49 -0700")
> Sometimes I want to fontify a whole buffer (really). One use case is
> to be able to then use the fontification for other (e.g. code)
> purposes than visual highlighting. But it really doesn't matter why -
> I just want to. ;-)
Agreed. We need two functions:
- font-lock-flush-region (which marks the region for re-fontification).
- font-lock-ensure-region (which makes sure the region is fontified).
The functions we have were designed before lazy/jit lock and were
adjusted in ad-hoc ways when jit/lazy was added.
For font-lock-ensure-region, you should be able to find sample code for
an implementation in various packages such as ps-print.el and
replace.el.
Stefan
next prev parent reply other threads:[~2011-09-23 4:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 13:32 command to fontify whole buffer? Drew Adams
2011-09-22 14:33 ` Alan Mackenzie
2011-09-22 14:46 ` Lennart Borgman
2011-09-22 15:33 ` Alan Mackenzie
2011-09-22 17:30 ` Dave Abrahams
2011-09-22 22:31 ` Lennart Borgman
2011-09-22 14:56 ` Drew Adams
2011-09-22 15:27 ` Alan Mackenzie
2011-09-22 15:43 ` Drew Adams
2011-09-22 22:34 ` Lennart Borgman
2011-09-25 20:54 ` Nix
2011-09-23 4:23 ` Stefan Monnier [this message]
2011-09-23 4:55 ` Jambunathan K
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=jwv62kjj3lb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--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).