unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done.
@ 2014-12-14 17:13 Alan Mackenzie
  2014-12-14 23:31 ` Stefan Monnier
  2014-12-15 18:50 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Mackenzie @ 2014-12-14 17:13 UTC (permalink / raw)
  To: 19381

Hello, Emacs.

The doc string for `sit-for', in its first (and most important) line
states unequivocally that redisplay is performed.  (That line is "Perform
redisplay, then wait for SECONDS seconds or until input is available.")

That's not what the function currently does - it doesn't perform
redisplay if input is already available when it is called.
A sentence lower down in the doc string contradicts its first line
("Redisplay does not happen if input is available before it starts.").

There is thus a clash between the doc-string and the code.  (The info
page agrees with the code).

It would seem at first sight that the obvious thing to do is correct the
first line of the doc string.  However there are lots (125) of instances
of "(sit-for 0)" in Emacs, and a lot of these are probably intended to
mean "perform redisplay NOW".  So it might be better to make `sit-for'
always do a redisplay.

However it's done, though, the clash between the doc string and
everything else should be resolved.

-- 
Alan Mackenzie (Nuremberg, Germany).





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

end of thread, other threads:[~2014-12-16 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-14 17:13 bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done Alan Mackenzie
2014-12-14 23:31 ` Stefan Monnier
2014-12-15 10:35   ` Alan Mackenzie
2014-12-15 14:41     ` Stefan Monnier
2014-12-15 18:50 ` Stefan Monnier
2014-12-16 17:00   ` Alan Mackenzie

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).