changeset 30628:abcc7a8d4fe4

(zone): Discard any pending input before running the randomly-chosen pgm.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 07 Aug 2000 07:50:13 +0000
parents fdfd55b3ff05
children 7c02f09cfefb
files lisp/play/zone.el
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/zone.el	Mon Aug 07 07:47:53 2000 +0000
+++ b/lisp/play/zone.el	Mon Aug 07 07:50:13 2000 +0000
@@ -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