From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: jit-lock timer etc. Date: Thu, 24 Aug 2006 11:10:56 +0200 Message-ID: References: <44E9E5F5.8000400@gmx.at> <87fyfpq5wf.fsf@stupidchicken.com> <44EA3222.9050405@gmx.at> <44EC49AD.2080001@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156410779 4030 80.91.229.2 (24 Aug 2006 09:12:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2006 09:12:59 +0000 (UTC) Cc: cyd@stupidchicken.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 11:12:56 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 1GGBGW-0007Ft-Ka for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 11:12:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGBGW-0003DR-0m for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 05:12:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGBG8-0003Bt-N9 for emacs-devel@gnu.org; Thu, 24 Aug 2006 05:12:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGBG5-0003BU-WA for emacs-devel@gnu.org; Thu, 24 Aug 2006 05:12:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGBG5-0003BR-QR for emacs-devel@gnu.org; Thu, 24 Aug 2006 05:12:17 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGBO6-0001au-B7; Thu, 24 Aug 2006 05:20:34 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 0527BFAC05E; Thu, 24 Aug 2006 11:12:09 +0200 (CEST) Original-To: martin rudalics In-Reply-To: (Kim F. Storm's message of "Wed, 23 Aug 2006 15:09:30 +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:58799 Archived-At: storm@cua.dk (Kim F. Storm) writes: > With the above change to current-idle-time, it seems the following > should work: > > (when (and jit-lock-stealth-buffers jit-lock-stealth-time) > ;; Call us again. > (let ((idle (current-idle-time))) > (when idle > (timer-set-idle-time jit-lock-stealth-repeat-timer delay) > (timer-inc-time jit-lock-stealth-repeat-timer (car idle) (cdr idle)) > (timer-activate-when-idle jit-lock-stealth-repeat-timer t))) > With the latest version of current-idle-time, this now becomes: (when (and jit-lock-stealth-buffers jit-lock-stealth-time) ;; Call us again. (let ((idle (current-idle-time))) (when idle (timer-set-idle-time jit-lock-stealth-repeat-timer idle) (timer-inc-time jit-lock-stealth-repeat-timer delay) (timer-activate-when-idle jit-lock-stealth-repeat-timer t))) [I swapped idle and delay args back again, as using floats DTRT] It can't get much simpler than that! -- Kim F. Storm http://www.cua.dk