From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: First fontification of a buffer happens before font lock is fully initialised. Date: Thu, 26 Jan 2012 10:58:25 +0000 Message-ID: <20120126105825.GA2735@acm.acm> References: <20120125124804.GB3638@acm.acm> <20120125182651.GA3624@acm.acm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1327575534 6597 80.91.229.12 (26 Jan 2012 10:58:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Jan 2012 10:58:54 +0000 (UTC) Cc: Hannu Koivisto , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 26 11:58:48 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RqN2V-00064Q-3Z for ged-emacs-devel@m.gmane.org; Thu, 26 Jan 2012 11:58:47 +0100 Original-Received: from localhost ([::1]:36186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqN2R-0007cF-ST for ged-emacs-devel@m.gmane.org; Thu, 26 Jan 2012 05:58:43 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqN2L-0007c8-2h for emacs-devel@gnu.org; Thu, 26 Jan 2012 05:58:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqN2F-0003GV-B3 for emacs-devel@gnu.org; Thu, 26 Jan 2012 05:58:37 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:32462 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqN2F-0003GJ-0M for emacs-devel@gnu.org; Thu, 26 Jan 2012 05:58:31 -0500 Original-Received: (qmail 73965 invoked by uid 3782); 26 Jan 2012 10:58:29 -0000 Original-Received: from acm.muc.de (pD95560EF.dip.t-dialin.net [217.85.96.239]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 26 Jan 2012 11:58:21 +0100 Original-Received: (qmail 2764 invoked by uid 1000); 26 Jan 2012 10:58:25 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147941 Archived-At: On Wed, Jan 25, 2012 at 08:43:48PM -0500, Stefan Monnier wrote: > jit-lock postpones fontification to whenever the text is actually > displayed, i.e. much later than initialization; it may very well never > fontify any part of the text at all, if the buffer is never displayed. Ah, OK. > > So do you agree that the code should be changed so that > > fontification always happens after running the mode-hook? > Yes, I agree. This was the behavior in Emacs-20, and is also the > behavior with jit-lock (i.e. the default behavior). I'm not sure what's > the best way to get that result, tho: adding yet-another keyword to > define-minor-mode is something I'd rather avoid. I can understand that. How about writing `font-lock-mode' explicitly rather than using `define-minor-mode'? The explicit fontification of the whole buffer could be removed from jit-lock (?and lazy-lock) since it will be redundant, and possibly because that explicit fontification might somehow depend on something in font-lock-mode-hook. > Stefan -- Alan Mackenzie (Nuremberg, Germany).