]> git.eshelyaron.com Git - emacs.git/commitdiff
(zone): Discard any pending input before running
authorEli Zaretskii <eliz@gnu.org>
Mon, 7 Aug 2000 07:50:13 +0000 (07:50 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 7 Aug 2000 07:50:13 +0000 (07:50 +0000)
the randomly-chosen pgm.

lisp/play/zone.el

index 6f2340d0485d8f4c962ffd825ace66396511bfe3..f0c5ded1b1d392bdb0ebd34e4a5c1c1c39b78bb9 100644 (file)
          (progn
             (message "Zoning... (%s)" pgm)
            (garbage-collect)
+           ;; If some input is pending, zone says "sorry", which
+           ;; isn't nice; this might happen e.g. when they invoke the
+           ;; game by clicking the menu bar.  So discard any pending
+           ;; input before zoning out.
+           (if (input-pending-p)
+               (discard-input))
            (funcall pgm)
            (message "Zoning...sorry"))
        (error