Peter Szilagyi committed c118158

Fixed a bug w.r.t. Emacs 24 in Omake.Overlay.delete-soon.

Comments (0)

Files changed (1)


     ;; from the original: It seems to be impossible to switch between
     ;; display frames without generating some kind of input event.
     (sit-for superhuman)                ; redisplay and flush events
-    (while (and (redisplay) (time-less-p (current-time) until-time))
+    ;; Emacs 23 and Emacs 24 DISPLAY are crucially different: Emacs 24
+    ;; now has a mode where DISPLAY can be implicitly forced by a
+    ;; variable, which is set by default.  So, don't rely on the
+    ;; result, or this WHILE loop will not be interrupted by input.
+    (while (and (not (input-pending-p))
+                (progn (redisplay)
+                       (time-less-p (current-time) until-time)))
       (sleep-for superhuman)))
   (delete-overlay overlay))