bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19381: The doc string for `sit-for' is wrong; redisplay isn't uncond


From: Alan Mackenzie
Subject: bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done.
Date: Sun, 14 Dec 2014 17:13:50 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]