From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer? Date: Wed, 24 Feb 2016 21:17:14 +0200 Message-ID: <838u29hq9x.fsf@gnu.org> References: <56CA94A8.3000205@gmail.com> <83bn76hw1o.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1456341456 22037 80.91.229.3 (24 Feb 2016 19:17:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 19:17:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 24 20:17:32 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYewD-0007S4-4B for ged-emacs-devel@m.gmane.org; Wed, 24 Feb 2016 20:17:29 +0100 Original-Received: from localhost ([::1]:37857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYewC-0001rJ-5L for ged-emacs-devel@m.gmane.org; Wed, 24 Feb 2016 14:17:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYew5-0001qx-Mu for emacs-devel@gnu.org; Wed, 24 Feb 2016 14:17:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYew1-0007Cr-Lj for emacs-devel@gnu.org; Wed, 24 Feb 2016 14:17:21 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYew1-0007Cd-Ij; Wed, 24 Feb 2016 14:17:17 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3879 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aYew0-000814-SH; Wed, 24 Feb 2016 14:17:17 -0500 In-reply-to: (message from Stefan Monnier on Wed, 24 Feb 2016 13:55:42 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:200635 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Wed, 24 Feb 2016 13:55:42 -0500 > > > Actually, in this particular case I think this is a bug in > > prettify-symbols-mode: it should define its own > > font-lock-ensure-function. The default value doesn't cover the kind > > of stuff that this mode uses font-lock for. > > Hmm... I don't see any reason why that should be the case. > IOW I think that if a change is needed it should be font-lock.el because > prettify-symbols-mode seems to be using font-lock in a "normal" way. I'm not sure about this (this machinery and its implications were never sufficiently documented, and what I think I know is the result of a desperate attempt to document it). However, please explain why font-lock-ensure-function calls font-lock-DEFAULT-fontify-buffer. If it's supposed to be good for any mode, why does it call the default fontification? As a matter of fact, if I replace the font-lock-default-fontify-buffer call with a call to font-lock-fontify-buffer, the problem described by the OP goes away. That is why I said what I said.