all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* sit-for incompatibility
@ 2003-04-07 18:50 Stefan Monnier
  2003-04-08  6:45 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2003-04-07 18:50 UTC (permalink / raw)


Emacs and XEmacs' sit-for functions are incompatible in that Emacs
uses (sit-for SECONDS MILLISECONDS NODISP) whereas XEmacs uses
(sit-for SECONDS NODISP).
I suggest that we change Emacs' function to recognize that if
NODISP is nil and MILLISECONDS is not a number, than we should
behave as XEmacs does.
The patch below does that, although I think the docstring part
of the patch is unsatisfactory.


	Stefan


--- dispnew.c.~1.314.~	Sat Mar 22 15:52:58 2003
+++ dispnew.c	Mon Apr  7 14:45:53 2003
@@ -6263,12 +6263,21 @@
 Optional third arg NODISP non-nil means don't redisplay, just wait for input.
 Redisplay is preempted as always if input arrives, and does not happen
 if input is available before it starts.
-Value is t if waited the full time with no input arriving.  */)
+Value is t if waited the full time with no input arriving.
+
+If MILLISECONDS is not a number and NODISP is nil, it is assumed that
+the second argument is actually meant to be used for NODISP. */)
      (seconds, milliseconds, nodisp)
      Lisp_Object seconds, milliseconds, nodisp;
 {
   int sec, usec;
 
+  if (NILP (nodisp) && !NUMBERP (milliseconds))
+    { /* New style.  */
+      nodisp = milliseconds;
+      milliseconds = Qnil;
+    }
+
   if (NILP (milliseconds))
     XSETINT (milliseconds, 0);
   else

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-08  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-07 18:50 sit-for incompatibility Stefan Monnier
2003-04-08  6:45 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.