From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: jit-lock timer etc. Date: Thu, 24 Aug 2006 15:48:14 -0400 Message-ID: <874pw1vrsx.fsf@stupidchicken.com> References: <44E9E5F5.8000400@gmx.at> <87fyfpq5wf.fsf@stupidchicken.com> <44EA3222.9050405@gmx.at> <44EC49AD.2080001@gmx.at> <87k64y8875.fsf@furball.mit.edu> <44EDD157.8010207@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156448829 13853 80.91.229.2 (24 Aug 2006 19:47:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2006 19:47:09 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 21:47:06 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGLAQ-0006jQ-7U for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 21:47:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGLAP-0005zc-N6 for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 15:47:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGLA8-0005vG-BV for emacs-devel@gnu.org; Thu, 24 Aug 2006 15:46:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGLA5-0005sJ-TJ for emacs-devel@gnu.org; Thu, 24 Aug 2006 15:46:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGLA5-0005rr-Oj for emacs-devel@gnu.org; Thu, 24 Aug 2006 15:46:45 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGLIB-0000ZK-Ju; Thu, 24 Aug 2006 15:55:07 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 1CABC4E2C4; Thu, 24 Aug 2006 15:48:14 -0400 (EDT) Original-To: martin rudalics In-Reply-To: <44EDD157.8010207@gmx.at> (martin rudalics's message of "Thu, 24 Aug 2006 18:18:31 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58827 Archived-At: martin rudalics writes: > I don't know what was wrong with this code since you didn't post it. >> It looks like you simply forgot to initialize jit-lock-stealth-repeat-timer, >> but I can't be sure. > > As suggested by rms for his resume timer I did in `jit-lock-mode': > > (when (and jit-lock-stealth-time (null jit-lock-stealth-timer)) > (setq jit-lock-stealth-timer > (run-with-idle-timer jit-lock-stealth-time t > 'jit-lock-stealth-fontify))) > (when (and jit-lock-stealth-time (null jit-lock-stealth-repeat-timer)) > (setq jit-lock-stealth-repeat-timer (timer-create)) > (timer-set-function jit-lock-stealth-repeat-timer > 'jit-lock-stealth-fontify t)) Now I know why your code didn't work. The very last line is wrong! It should be (timer-set-function jit-lock-stealth-repeat-timer 'jit-lock-stealth-fontify '(t))) I believe that with this change, everything will work. (Now that you mention it, it is slightly cleaner to reuse the repeat-timer than to create a new one each time.)