unofficial mirror of emacs-devel@gnu.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

* Re: sit-for incompatibility
  2003-04-07 18:50 sit-for incompatibility Stefan Monnier
@ 2003-04-08  6:45 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2003-04-08  6:45 UTC (permalink / raw)
  Cc: emacs-devel

The change is ok with me.

^ 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).