From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Mode-specific font lock delays Date: Sun, 04 Sep 2016 09:34:05 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473000913 15640 195.159.176.226 (4 Sep 2016 14:55:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2016 14:55:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 04 16:55:05 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgYp3-0002kt-29 for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Sep 2016 16:55:01 +0200 Original-Received: from localhost ([::1]:50138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgYp0-0003vd-Pb for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Sep 2016 10:54:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgXZ3-0001bh-Mw for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 09:34:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgXYz-0005Dj-Gj for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 09:34:24 -0400 Original-Received: from [195.159.176.226] (port=54025 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgXYz-0005Cl-AM for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 09:34:21 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bgXYs-0007SA-3V for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 15:34:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:xd695rW4Ct6Gh+AITpVnJ9qW2G0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Mailman-Approved-At: Sun, 04 Sep 2016 10:54:14 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111249 Archived-At: > 1) Changing the variable is not mode-specific, but changes how > font-lock operates on all buffers. That's not right as I want the > increased defer time to only apply to this mode's buffers. Indeed, it was designed as a (global) user-option, not something decided by the major mode. > 2) When a file is opened, there is a flicker as font-lock waits for > the timeout before highlighting the buffer. It would be much better if > there was no delay for the first highlighting pass. Hmmm... jit-lock currently doesn't distinguish the "first pass" at all. Also I'm not sure if ignoring the jit-lock-defer for the "first pass" would result in good behavior for you: it'd be laggy not just when displaying the window the first time, but also everytime a new part of the buffer becomes visible. > Can these two problems be solved? So far the experience has been that font-lock can be made fast enough that those things aren't needed. Stefan