From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Defer jit-lock on a per-buffer basis Date: Thu, 15 Nov 2012 19:28:05 +0100 Message-ID: <871ufuk9fu.fsf@thinkpad.tsdh.de> References: <87r4nvmcx7.fsf@thinkpad.tsdh.de> <83obiyu7p7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353004110 14207 80.91.229.3 (15 Nov 2012 18:28:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2012 18:28:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 15 19:28:41 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1TZ4B6-0001Y1-Bn for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 19:28:40 +0100 Original-Received: from localhost ([::1]:48175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ4Aw-0006EU-9y for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 13:28:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ4Ao-0006Ds-Ia for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 13:28:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZ4Al-0000tQ-Fo for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 13:28:22 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ4Al-0000t8-9C for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 13:28:19 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TZ4As-0001M6-AV for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 19:28:26 +0100 Original-Received: from 91-67-10-84-dynip.superkabel.de ([91.67.10.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2012 19:28:26 +0100 Original-Received: from tsdh by 91-67-10-84-dynip.superkabel.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2012 19:28:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 91-67-10-84-dynip.superkabel.de User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:5AqyN07aPHSD60FLCyQfAxrt1l8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87711 Archived-At: Eli Zaretskii writes: >> So is there a way to enable deferred jit-lock on a per-buffer basis? > > Not without rewriting the JIT Lock code, I think. JIT Lock goes over > all of the buffers with the same timers, so any option you customize > will affect all of the buffers. Right, so why not simply making the timers buffer-local, too? I've tried that --8<---------------cut here---------------start------------->8--- (defun th-jit-lock-defer-fontification () (interactive) (make-local-variable 'jit-lock-stealth-timer) (make-local-variable 'jit-lock-stealth-repeat-timer) (make-local-variable 'jit-lock-context-timer) (make-local-variable 'jit-lock-defer-timer) (set (make-local-variable 'jit-lock-defer-time) 0.1) (font-lock-mode -1) (font-lock-mode 1)) --8<---------------cut here---------------end--------------->8--- and it seems to work exactly as expected. :-) Thanks, Tassilo