From: Eli Zaretskii Date: Mon, 7 Aug 2000 07:50:13 +0000 (+0000) Subject: (zone): Discard any pending input before running X-Git-Tag: emacs-pretest-21.0.90~2462 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f244674ca597cfbabdceaa1fd20cba629d3c17bb;p=emacs.git (zone): Discard any pending input before running the randomly-chosen pgm. --- diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 6f2340d0485..f0c5ded1b1d 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -107,6 +107,12 @@ (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