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: Mon, 22 Feb 2016 18:13:59 +0200 Message-ID: <83si0klo3c.fsf@gnu.org> References: <56CA94A8.3000205@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1456157714 13974 80.91.229.3 (22 Feb 2016 16:15:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2016 16:15:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 22 17:15:10 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 1aXt8U-0006lf-7Q for ged-emacs-devel@m.gmane.org; Mon, 22 Feb 2016 17:14:58 +0100 Original-Received: from localhost ([::1]:49902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXt8T-0007cd-Lp for ged-emacs-devel@m.gmane.org; Mon, 22 Feb 2016 11:14:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXt7o-0006yu-77 for emacs-devel@gnu.org; Mon, 22 Feb 2016 11:14:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXt7g-0006BN-4I for emacs-devel@gnu.org; Mon, 22 Feb 2016 11:14:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXt7f-0006AB-Qf; Mon, 22 Feb 2016 11:14:07 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1198 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aXt7f-0004NQ-8a; Mon, 22 Feb 2016 11:14:07 -0500 In-reply-to: <56CA94A8.3000205@gmail.com> (message from =?utf-8?Q?Cl=C3=A9?= =?utf-8?Q?ment?= Pit--Claudel on Sun, 21 Feb 2016 23:55:04 -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:200459 Archived-At: > From: Clément Pit--Claudel > Date: Sun, 21 Feb 2016 23:55:04 -0500 > > IIUC the proper way in Emacs 25 to signal changes that require a refontification to font-lock is to call font-lock-flush. This doesn't always do as much as font-lock-fontify-buffer does, though. > > In particular, when the font-lock-fontified variable is nil (which does happen, though I don't know why; I don't know what this variable is for), then calling font-lock-fontify buffer does refontify the whole buffer, but font-lock-flush and font-lock-ensure don't seem to do anything. > > What's the proper way to mark a buffer for refontification (and refontify the visible portion) immediately in 25? I think what you describe _is_ the proper way. Can you show a test case which demonstrates how calling font-lock-flush followed by font-lock-ensure fails to do the job? Thanks.