From xemacs-m  Wed Dec 18 04:14:42 1996
Received: from proxy1.ba.best.com (root@proxy1.ba.best.com [206.184.139.12])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id EAA02779 for <xemacs-beta@xemacs.org>; Wed, 18 Dec 1996 04:14:42 -0600 (CST)
Received: from shellx.best.com (shellx.best.com [206.86.0.11]) by proxy1.ba.best.com (8.8.4/8.8.3) with ESMTP id CAA07175 for <xemacs-beta@xemacs.org>; Wed, 18 Dec 1996 02:13:22 -0800 (PST)
Received: from 666.com (shellx.best.com [206.86.0.11]) by shellx.best.com (8.8.4/8.8.3) with SMTP id CAA26318 for <xemacs-beta@xemacs.org>; Wed, 18 Dec 1996 02:12:43 -0800 (PST)
Date: Wed, 18 Dec 1996 02:12:43 -0800 (PST)
Message-Id: <199612181012.CAA26318@shellx.best.com>
From: Ben Wing <ben@666.com>
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>,
        David Moore
    <dmoore@UCSD.EDU>
Subject: Re:  sit-for bug & patch
Cc: steve@miranova.com

You need to use record_unwind_protect() to decrement already_in_sit_for.
In any case though your solution is not correct.  You need to write a
function that scans pending_timeout_list for a specified id, and use it in
place of this code:

        case timeout_event:
          {
            if (XEVENT (event)->event.timeout.id_number != id)
              /* a timeout that wasn't the one we're waiting for */
              goto EXECUTE_INTERNAL;
            id = 0;     /* assert that we are no longer waiting for it. */

