Article View: gnu.emacs.bug
Article #88072Re: font-lock-fontify-region doesn't seem to work right
From: William G. Dubuque
Date: Mon, 08 Aug 1994 05:03
Date: Mon, 08 Aug 1994 05:03
38 lines
2365 bytes
2365 bytes
From: werner@mc.ab.COM (tim werner) Date: 4 Aug 1994 11:50:31 -0400 >Date: Wed, 3 Aug 94 17:40:21 -0400 >From: rms@gnu.ai.mit.edu (Richard Stallman) > > In emacs-19.25, with face-lock 3.03, using font-lock-fontify-region seems > to re-fontify only the "comment", and "string" faces, but not "keyword", > "type", or "function". > >I am not sure what you mean. Please send me a precise recipe >for a problem and tell me precisely what I should expect to see >that is wrong at the end of it. font-lock-fontify-region only does syntactic fontification (comments and strings); it does not call font-lock-hack-keywords to process any regexps specifying keywords. You could probably get what you want by calling: (font-lock-after-change-function start end 0) which pretends that you just inserted the region [start, end]. However, this would be somewhat a violation of modularity. font-lock should export a well-named function to achieve this. But why are you calling these functions in the first place? If you desire incremental on-the-fly lazy fontification then you should wait for my 'FontiFly' package which will be released in the near future. It fontifies on demand (i.e. regions in the buffer are fontified only when they need to be displayed). This is much faster than font-lock or face-lock or anything else I've heard of (especially if you do a lot of tags operations that load many files). When you use FontiFly you essentially get fontification for free, there are no delays whatsoever. -Bill
Technical Details
Message-ID:
<WGD.94Aug6165448@martigny.ai.mit.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!sun.cais.com!io.org!uunet.ca!uunet.ca!spool.mu.edu!uwm.edu!cs.utexas.edu!math.ohio-state.edu!cis.ohio-state.edu!zurich.ai.mit.edu!wgdReferences:
<199408040109.VAA05393@sparcserver.mc.ab.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,e1a46b9b82d176c2 X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-07 23:10:35 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!sun.cais.com!io.org!uunet.ca!uunet.ca!spool.mu.edu!uwm.edu!cs.utexas.edu!math.ohio-state.edu!cis.ohio-state.edu!zurich.ai.mit.edu!wgd From: wgd@zurich.ai.mit.edu (William G. Dubuque) Newsgroups: gnu.emacs.bug Subject: Re: font-lock-fontify-region doesn't seem to work right Date: 8 Aug 1994 01:03:19 -0400 Organization: M.I.T. Artificial Intelligence Lab. Lines: 39 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <WGD.94Aug6165448@martigny.ai.mit.edu> References: <199408040109.VAA05393@sparcserver.mc.ab.com>