From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: jit-lock timer etc. Date: Thu, 24 Aug 2006 14:23:26 +0200 Message-ID: <44ED9A3E.3050001@gmx.at> 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=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156422303 9753 80.91.229.2 (24 Aug 2006 12:25:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2006 12:25:03 +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 14:25:01 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 1GGEGX-000818-GQ for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 14:24:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGEGX-0003ZH-0N for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 08:24:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGEFr-00033U-TS for emacs-devel@gnu.org; Thu, 24 Aug 2006 08:24:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGEFr-00033I-FC for emacs-devel@gnu.org; Thu, 24 Aug 2006 08:24:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGEFr-00033F-Cx for emacs-devel@gnu.org; Thu, 24 Aug 2006 08:24:15 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GGENu-00050p-Gg for emacs-devel@gnu.org; Thu, 24 Aug 2006 08:32:34 -0400 Original-Received: (qmail invoked by alias); 24 Aug 2006 12:24:13 -0000 Original-Received: from N765P017.adsl.highway.telekom.at (EHLO [62.47.39.145]) [62.47.39.145] by mail.gmx.net (mp025) with SMTP; 24 Aug 2006 14:24:13 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: "Kim F. Storm" In-Reply-To: X-Y-GMX-Trusted: 0 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:58803 Archived-At: > 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! > It still doesn't trigger. With (when (and jit-lock-stealth-buffers jit-lock-stealth-time) ;; Call us again. (let ((message-log-max t) (count 0)) (let ((idle (current-idle-time))) (message "idle ... %s" idle) (when idle (message "%s ... %s" (setq count (1+ count)) jit-lock-stealth-repeat-timer) (timer-set-idle-time jit-lock-stealth-repeat-timer idle) (message "%s ... %s" (setq count (1+ count)) jit-lock-stealth-repeat-timer) (timer-inc-time jit-lock-stealth-repeat-timer (max delay 0.1)) (message "%s ... %s" (setq count (1+ count)) jit-lock-stealth-repeat-timer) (timer-activate-when-idle jit-lock-stealth-repeat-timer t) (message "%s ... %s" (setq count (1+ count)) jit-lock-stealth-repeat-timer))))) I get idle ... 3.02 1 ... [t nil nil nil nil jit-lock-stealth-fontify t nil] 2 ... [t 0 3 20000 nil jit-lock-stealth-fontify t nil] 3 ... [t 0 3 120000 nil jit-lock-stealth-fontify t nil] 4 ... [nil 0 3 120000 nil jit-lock-stealth-fontify t t] idle ... 3.02 1 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 2 ... [t 0 3 20000 nil jit-lock-stealth-fontify t t] 3 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 4 ... [nil 0 3 120000 nil jit-lock-stealth-fontify t t] idle ... 3.02 1 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 2 ... [t 0 3 20000 nil jit-lock-stealth-fontify t t] 3 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 4 ... [nil 0 3 120000 nil jit-lock-stealth-fontify t t] idle ... 3.02 1 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 2 ... [t 0 3 20000 nil jit-lock-stealth-fontify t t] 3 ... [t 0 3 120000 nil jit-lock-stealth-fontify t t] 4 ... [nil 0 3 120000 nil jit-lock-stealth-fontify t t] hence `current-idle-time' always returns the same value.