From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: idle-timer clock gets reset upon subprocess output. Date: Thu, 27 Jun 2002 10:45:13 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200206271645.g5RGjDe14058@santafe.santafe.edu> References: Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1025196491 27187 127.0.0.1 (27 Jun 2002 16:48:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2002 16:48:11 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17NcRH-00074N-00 for ; Thu, 27 Jun 2002 18:48:11 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17NcTx-0004Ky-00 for ; Thu, 27 Jun 2002 18:50:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NcRJ-0000nj-00; Thu, 27 Jun 2002 12:48:13 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NcOR-0000Pi-00; Thu, 27 Jun 2002 12:45:15 -0400 Original-Received: from santafe.santafe.edu (santafe [192.12.12.2]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g5RGjEB05683; Thu, 27 Jun 2002 10:45:14 -0600 (MDT) Original-Received: (from rms@localhost) by santafe.santafe.edu (8.10.2+Sun/8.9.3) id g5RGjDe14058; Thu, 27 Jun 2002 10:45:13 -0600 (MDT) X-Authentication-Warning: santafe.santafe.edu: rms set sender to rms@santafe using -f Original-To: deego@glue.umd.edu In-Reply-To: (deego@glue.umd.edu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5235 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5235 I think I have fixed it. Please try this fix. *** keyboard.c.~1.683.~ Tue Jun 18 04:21:20 2002 --- keyboard.c Thu Jun 27 08:41:32 2002 *************** *** 664,669 **** --- 664,674 ---- static EMACS_TIME timer_idleness_start_time; + /* After Emacs stops being idle, this saves the last value + of timer_idleness_start_time from when it was idle. */ + + static EMACS_TIME timer_last_idleness_start_time; + /* Global variable declarations. */ *************** *** 3999,4004 **** --- 4004,4011 ---- EMACS_GET_TIME (timer_idleness_start_time); + timer_last_idleness_start_time = timer_idleness_start_time; + /* Mark all idle-time timers as once again candidates for running. */ for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers)) { *************** *** 8332,8337 **** --- 8339,8351 ---- keymap may have changed, so replay the sequence. */ if (BUFFERP (key)) { + EMACS_TIME initial_idleness_start_time + = timer_last_idleness_start_time; + + /* Resume idle state, using the same start-time as before. */ + timer_start_idle (); + timer_idleness_start_time = initial_idleness_start_time; + mock_input = t; /* Reset the current buffer from the selected window in case something changed the former and not the latter.