From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: jit-lock timer etc. Date: Thu, 24 Aug 2006 01:20:39 -0400 Message-ID: References: <44E9E5F5.8000400@gmx.at> <87fyfpq5wf.fsf@stupidchicken.com> <44EA3222.9050405@gmx.at> <44EC49AD.2080001@gmx.at> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1156396908 30296 80.91.229.2 (24 Aug 2006 05:21:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2006 05:21:48 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 24 07:21:47 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 1GG7ew-00076B-8z for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 07:21:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GG7ev-0005bE-NK for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 01:21:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GG7dx-0004x5-IP for emacs-devel@gnu.org; Thu, 24 Aug 2006 01:20:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GG7dx-0004wR-0I for emacs-devel@gnu.org; Thu, 24 Aug 2006 01:20:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GG7dw-0004wI-Qp for emacs-devel@gnu.org; Thu, 24 Aug 2006 01:20:40 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GG7lw-0003SR-60 for emacs-devel@gnu.org; Thu, 24 Aug 2006 01:28:56 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GG7dv-0004ym-Rf; Thu, 24 Aug 2006 01:20:39 -0400 Original-To: martin rudalics In-reply-to: <44EC49AD.2080001@gmx.at> (message from martin rudalics on Wed, 23 Aug 2006 14:27:25 +0200) 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:58789 Archived-At: > creates an ordinary timer, not an idle timer. > It will run even if Emacs is not idle. It simply tries to mimic the behavior of `jit-lock-stealth-fontify' without sit-fors. But it doesn't. If the user types something, sit-for will return, but the arrival of input has no effect on the (ordinary) timer. > I think this ought to use run-with-idle-timer > and current-idle-time, as in my patch. I was not able to accomplish that since the idle timer does not trigger. In analogy to your patch I replaced the above by (when (and jit-lock-stealth-buffers jit-lock-stealth-time) ;; Call us again. (timer-set-idle-time jit-lock-stealth-repeat-timer (current-idle-time)) (timer-inc-time jit-lock-stealth-repeat-timer delay) (timer-activate-when-idle jit-lock-stealth-repeat-timer t) but I suspect that calling `timer-set-idle-time' with the return value of `current-idle-time' does not DTRT: Please try using time-to-seconds to convert. I tried to replace `timer-set-idle-time' with `timer-set-time' but without avail. That's like trying to fix a flat tire by breaking the car's windshield. Why even consider it?