Mercurial > emacs
diff lisp/play/zone.el @ 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 | fbdf4c1e1acf |
children | abc299ad3386 |
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