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: Wed, 25 Jan 2012 18:26:51 +0000 Message-ID: <20120125182651.GA3624@acm.acm> References: <20120125124804.GB3638@acm.acm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1327516054 7833 80.91.229.12 (25 Jan 2012 18:27:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2012 18:27:34 +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 Wed Jan 25 19:27:30 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 1Rq7ZA-0005a3-Mf for ged-emacs-devel@m.gmane.org; Wed, 25 Jan 2012 19:27:28 +0100 Original-Received: from localhost ([::1]:35411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq7Z9-0008Ps-V6 for ged-emacs-devel@m.gmane.org; Wed, 25 Jan 2012 13:27:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq7Yg-0007T5-60 for emacs-devel@gnu.org; Wed, 25 Jan 2012 13:27:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq7Ya-0002j4-6l for emacs-devel@gnu.org; Wed, 25 Jan 2012 13:26:57 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:63305 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq7YZ-0002ii-SL for emacs-devel@gnu.org; Wed, 25 Jan 2012 13:26:52 -0500 Original-Received: (qmail 3754 invoked by uid 3782); 25 Jan 2012 18:26:48 -0000 Original-Received: from acm.muc.de (pD9556726.dip.t-dialin.net [217.85.103.38]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 25 Jan 2012 19:26:47 +0100 Original-Received: (qmail 3632 invoked by uid 1000); 25 Jan 2012 18:26:51 -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:147922 Archived-At: Hello, Stefan. On Wed, Jan 25, 2012 at 12:46:04PM -0500, Stefan Monnier wrote: > > This situation was found and analysed by Hannu Koivisto after CC Mode > > crashed for this reason on a C++ buffer. Why it doesn't happen for > > every CC Mode buffer is not yet clear. > I think the behavior depends on the use of font-lock-support-mode. > With jit-lock, fontification takes place after running the mode-hook, > whereas without it, fontification takes place before. Surely this cannot be - the hooks are run at the end of the define-minor-mode expansion no matter what. Surely the hooks are not being run twice. Though I admit I haven't tracked down the stages in initialising jit-lock-mode. Hannu's bug report said nothing about disabling jit-lock, so I presume it was enabled. > Stefan -- Alan Mackenzie (Nuremberg, Germany).