unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Jonas Bernoulli <jonas@bernoul.li>,
	62751@debbugs.gnu.org
Subject: bug#62751: 29.0.90; New libraries that still need to be assigned to packages
Date: Fri, 13 Oct 2023 19:33:35 -0400	[thread overview]
Message-ID: <jwv1qdym78g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADwFkm=99F0P6om1a0MwbrSpy30h8389kPJtp+x4-sh9DjB53A@mail.gmail.com> (Stefan Kangas's message of "Sat, 23 Sep 2023 04:35:21 -0700")

>> BTW, what about `sit-for`s obsolete calling convention (obsoleted in 22.1)?
> Yeah, it's probably time to remove it.

Done, thanks,
BTW, how 'bout we drop the `millisec` arg of `sleep-for` as well (and
the pretense that there are still systems that can only sleep for whole
seconds)?



        Stefan


diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index fdf5ec1d7fe..7fee967d0ee 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -3969,20 +3969,17 @@ Waiting
 thus equivalent to @code{sleep-for}, which is described below.
 @end defun
 
-@defun sleep-for seconds &optional millisec
+@defun sleep-for seconds
 This function simply pauses for @var{seconds} seconds without updating
 the display.  It pays no attention to available input.  It returns
 @code{nil}.
 
 The argument @var{seconds} need not be an integer.  If it is floating
 point, @code{sleep-for} waits for a fractional number of seconds.
-Some systems support only a whole number of seconds; on these systems,
-@var{seconds} is rounded down.
 
-The optional argument @var{millisec} specifies an additional waiting
-period measured in milliseconds.  This adds to the period specified by
-@var{seconds}.  If the system doesn't support waiting fractions of a
-second, you get an error if you specify nonzero @var{millisec}.
+It is also possible to call @code{sleep-for} with two arguments,
+as @code{(sleep-for @var{seconds} @var{millisec})},
+but that is considered obsolete.
 
 Use @code{sleep-for} when you wish to guarantee a delay.
 @end defun
diff --git a/lisp/subr.el b/lisp/subr.el
index 58274987d71..a2315110a0d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1959,6 +1959,7 @@ log10
 (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3")
 (set-advertised-calling-convention 'libxml-parse-xml-region '(&optional start end base-url) "27.1")
 (set-advertised-calling-convention 'libxml-parse-html-region '(&optional start end base-url) "27.1")
+(set-advertised-calling-convention 'sleep-for '(seconds) "30.1")
 (set-advertised-calling-convention 'time-convert '(time form) "29.1")
 \f
 ;;;; Obsolescence declarations for variables, and aliases.
diff --git a/src/dispnew.c b/src/dispnew.c
index d6a27ac29ec..e4037494775 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6206,9 +6206,9 @@ bitch_at_user (void)
 DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0,
        doc: /* Pause, without updating display, for SECONDS seconds.
 SECONDS may be a floating-point value, meaning that you can wait for a
-fraction of a second.  Optional second arg MILLISECONDS specifies an
-additional wait period, in milliseconds; this is for backwards compatibility.
-\(Not all operating systems support waiting for a fraction of a second.)  */)
+fraction of a second.
+An optional second arg MILLISECONDS can be provided but is deprecated:
+it specifies an additional wait period, in milliseconds.  */)
   (Lisp_Object seconds, Lisp_Object milliseconds)
 {
   double duration = extract_float (seconds);






  reply	other threads:[~2023-10-13 23:33 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 13:04 bug#62751: 29.0.90; New libraries that still need to be assigned to packages Jonas Bernoulli
2023-04-10 13:30 ` Eli Zaretskii
2023-04-11 16:03 ` Michael Albinus
2023-04-11 17:16   ` Jonas Bernoulli
2023-09-05 23:49     ` Stefan Kangas
2023-09-16  9:21       ` Stefan Kangas
2023-09-16 14:23 ` Stefan Kangas
2023-09-17 22:06   ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-18  7:34     ` Stefan Kangas
2023-09-18 11:02       ` Eli Zaretskii
2023-09-18 11:10         ` Stefan Kangas
2023-09-18 11:49           ` Eli Zaretskii
2023-09-21  0:15             ` Stefan Kangas
2023-09-21  2:29               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-21  7:26                 ` Stefan Kangas
2023-09-21 14:01                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 12:36                     ` Stefan Kangas
2023-09-21  7:15               ` Eli Zaretskii
2023-09-21  7:29                 ` Stefan Kangas
2023-09-23 14:42                 ` Stefan Kangas
2023-09-24 18:07                   ` John Wiegley
2023-09-24 20:22                     ` Stefan Kangas
2023-09-24 21:05                       ` John Wiegley
2023-09-26 22:37                       ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-18 11:58       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-21  0:06         ` Stefan Kangas
2023-09-18 15:19       ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-20 15:59         ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 12:29           ` Stefan Kangas
2023-10-01 13:11         ` Stefan Kangas
2023-10-01 13:56           ` Eli Zaretskii
2023-10-01 15:46             ` Stefan Kangas
2023-10-01 16:52               ` Eli Zaretskii
2023-10-01 17:46                 ` Stefan Kangas
2023-09-18 15:33       ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-21  0:04         ` Stefan Kangas
2023-09-21 21:12           ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 15:30             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 11:35               ` Stefan Kangas
2023-10-13 23:33                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-14  6:45                   ` Eli Zaretskii
2023-10-14 14:39                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 16:21                     ` Stefan Kangas
2023-09-19 23:12       ` Richard Stallman
2023-09-20 23:45         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv1qdym78g.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62751@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jonas@bernoul.li \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).