From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Nested sit-for's Date: Thu, 17 Aug 2006 10:14:53 -0400 Message-ID: <87hd0bjvoi.fsf@furball.mit.edu> References: <87y7tp90i1.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155824134 1445 80.91.229.2 (17 Aug 2006 14:15:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2006 14:15:34 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 17 16:15:32 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 1GDieS-0003u7-0p for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2006 16:15:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDieR-00033e-8f for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2006 10:15:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDieD-00032U-DV for emacs-devel@gnu.org; Thu, 17 Aug 2006 10:15:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDieB-00031J-VS for emacs-devel@gnu.org; Thu, 17 Aug 2006 10:15:00 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GDikg-0007q3-Rj; Thu, 17 Aug 2006 10:21:43 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k7HEEuWA019408; Thu, 17 Aug 2006 10:14:57 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id k7HEEuBt029377; Thu, 17 Aug 2006 10:14:56 -0400 (EDT) Original-Received: from furball.mit.edu (SYDNEYPACIFIC-THREE-NINETY-NINE.MIT.EDU [18.95.6.144]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k7HEEqYG011132; Thu, 17 Aug 2006 10:14:53 -0400 (EDT) Original-Received: from cyd by furball.mit.edu with local (Exim 3.36 #1 (Debian)) id 1GDie5-0000YD-00; Thu, 17 Aug 2006 10:14:53 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Thu, 17 Aug 2006 13:15:47 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: 1.217 X-Scanned-By: MIMEDefang 2.42 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:58464 Archived-At: storm@cua.dk (Kim F. Storm) writes: >> It would work to have ONE timer that does sit-for if we make a rule >> that no others can do so. We could define jit-lock as this one >> exception. (This has the advantage of not involving any change in the >> code, just comments and the Lisp Manual.) > > I agree with your analysis. > > But, IMO, if we make it a rule that timers should generally not use > sit-for, then a central function like jit-lock should definitely not > use sit-for! If we simply document that "timers (and process filters) should avoid using sit-for", it should be clear to the reader that rare exceptions may exist (especially if we add a comment to jit-lock-stealth-fontify stating this). After the release, we can probably rework jit-lock-stealth-fontify to avoid using sit-for, but I don't think the current situation is bad enough to block the release. OTOH, I don't remember any other timers or process filters in the Emacs tree that use a long sit-for or loop waiting for input. Anyone know of any?