From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: The history of sit_for vs sit-for Date: Thu, 29 May 2014 10:18:45 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401373157 23876 80.91.229.3 (29 May 2014 14:19:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 May 2014 14:19:17 +0000 (UTC) Cc: Emacs-devel@gnu.org To: Chong Yidong , Kim F. Storm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 29 16:19:10 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wq1Ac-00073N-0y for ged-emacs-devel@m.gmane.org; Thu, 29 May 2014 16:19:02 +0200 Original-Received: from localhost ([::1]:48459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1Ab-00051O-J2 for ged-emacs-devel@m.gmane.org; Thu, 29 May 2014 10:19:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1AS-000518-8W for Emacs-devel@gnu.org; Thu, 29 May 2014 10:18:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wq1AM-0006XH-Un for Emacs-devel@gnu.org; Thu, 29 May 2014 10:18:52 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:18661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1AM-0006XD-Q0 for Emacs-devel@gnu.org; Thu, 29 May 2014 10:18:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEGAIDvNVPO+IOj/2dsb2JhbABZgwYBg0m5A4c6gRcXdIMCIykmJhgNJAESh3nSGReOI1eEPwSjKoVvgWqDTCGBLQ X-IPAS-Result: AvEGAIDvNVPO+IOj/2dsb2JhbABZgwYBg0m5A4c6gRcXdIMCIykmJhgNJAESh3nSGReOI1eEPwSjKoVvgWqDTCGBLQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="64961209" Original-Received: from 206-248-131-163.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 May 2014 10:18:45 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9953F601BC; Thu, 29 May 2014 10:18:45 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172173 Archived-At: Hi Yidong and Kim, Around July 2006, a whole bunch of sit-for related changes were made resulting among other things in moving `sit-for' to Elisp (while keeping a `sit_for' implemented in C as well). Do you guys remember what this was about? We're having problems still with sit-for, because it uses `read-event' and then pushes those back to unread-command-events and this bumps into various problems in corner cases. It seems that the C version `sit_for' does not suffer from those problems, so I'm strongly tempted to move `sit-for' back to C, but I'd rather not just go back to some old problem. See appended some of the relevant commit messages, in the hopes that it might help your memory. Stefan revno: 72101 committer: Chong Yidong timestamp: Wed 2006-07-26 18:18:26 +0000 message: * subr.el (sit-for): Use new SECONDS arg of read-event instead of a timer. ------------------------------------------------------------ revno: 72059 committer: Richard M. Stallman timestamp: Mon 2006-07-24 17:01:08 +0000 message: (dolist, dotimes): Use interned symbols for iteration. (--dotimes-limit--, --dolist-tail--): New defvars. (looking-back): Doc fix. ------------------------------------------------------------ revno: 71924 committer: Chong Yidong timestamp: Tue 2006-07-18 01:34:48 +0000 message: * subr.el (sit-for): Just sleep-for if noninteractive. ------------------------------------------------------------ revno: 71738 committer: Kim F. Storm timestamp: Tue 2006-07-11 00:17:43 +0000 message: (sit-for): Doc fix. Specify normal arg list using fn-form. Remove special case for seconds < 0. Use (redisplay t) instead. ------------------------------------------------------------ revno: 71735 committer: Kim F. Storm timestamp: Mon 2006-07-10 23:54:17 +0000 message: (Fredisplay): Doc fix. ------------------------------------------------------------ revno: 71734 committer: Kim F. Storm timestamp: Mon 2006-07-10 23:52:38 +0000 message: (Fredisplay): Add FORCE argument to force redisplay when input is available. Fix test for redisplay_dont_pause non-nil. Specbind redisplay-dont-pause to t if FORCE non-nil. ------------------------------------------------------------ revno: 71726 committer: Chong Yidong timestamp: Mon 2006-07-10 18:52:13 +0000 message: * subr.el (sit-for): New function. * play/hanoi.el (hanoi-sit-for): Check sit-for return value. ------------------------------------------------------------ revno: 71724 committer: Chong Yidong timestamp: Mon 2006-07-10 18:51:31 +0000 message: * puresize.h (BASE_PURESIZE): Increment to 1211000. * dispnew.c (Fredisplay): New function, equivalent to (sit-for 0). (Fsit_for): Function deleted. * keyboard.c (command_loop_1, Fexecute_extended_command): Call sit_for instead of Fsit_for. * minibuf.c (temp_echo_area_glyphs): Likewise. ------------------------------------------------------------ revno: 71536 committer: Kim F. Storm timestamp: Mon 2006-07-03 15:00:28 +0000 message: (sit_for): Fix preempt condition. ------------------------------------------------------------ revno: 71341 committer: Kim F. Storm timestamp: Sat 2006-06-17 00:11:59 +0000 message: (update_frame): Check for input pending on entry. (update_window, update_frame_1): Break loop if input is detected. ------------------------------------------------------------ revno: 71296 committer: Kim F. Storm timestamp: Tue 2006-06-13 22:06:22 +0000 message: (sit_for): Undo 2006-06-01 change. Instead, a negative time forces redisplay even when input is available. (Fsit_for): Doc fix. ------------------------------------------------------------ revno: 71286 committer: Kim F. Storm timestamp: Mon 2006-06-12 22:32:47 +0000 message: Modify preemptive redisplay to be based on periodic checks for input. (PERIODIC_PREEMPTION_CHECKING): Define to 1 iff EMACS_HAS_USECS. (Vredisplay_preemption_period): New variable. (syms_of_display): DEFVAR_LISP and initialize it. (preemption_period, preemption_next_check): New variables. (update_frame, update_single_window): Initialize them based on Vredisplay_preemption_period if !force_p. (update_window, update_frame_1): Use them to determine when to check for input. ------------------------------------------------------------ revno: 71174 committer: David Kastrup timestamp: Sun 2006-06-04 15:07:25 +0000 message: Mention `redisplay-dont-pause' in doc string of `sit-for'. ------------------------------------------------------------ revno: 71104 committer: Richard M. Stallman timestamp: Thu 2006-06-01 21:04:58 +0000 message: Whitespace changes. ------------------------------------------------------------ revno: 71101 committer: Kim F. Storm timestamp: Thu 2006-06-01 13:53:19 +0000 message: (sit_for): Perform redisplay even if input is pending when redisplay-dont-pause is non-nil.