comparison 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
comparison
equal deleted inserted replaced
30627:fdfd55b3ff05 30628:abcc7a8d4fe4
105 (when ct (modify-frame-parameters f '((cursor-type . (bar . 0))))) 105 (when ct (modify-frame-parameters f '((cursor-type . (bar . 0)))))
106 (condition-case nil 106 (condition-case nil
107 (progn 107 (progn
108 (message "Zoning... (%s)" pgm) 108 (message "Zoning... (%s)" pgm)
109 (garbage-collect) 109 (garbage-collect)
110 ;; If some input is pending, zone says "sorry", which
111 ;; isn't nice; this might happen e.g. when they invoke the
112 ;; game by clicking the menu bar. So discard any pending
113 ;; input before zoning out.
114 (if (input-pending-p)
115 (discard-input))
110 (funcall pgm) 116 (funcall pgm)
111 (message "Zoning...sorry")) 117 (message "Zoning...sorry"))
112 (error 118 (error
113 (while (not (input-pending-p)) 119 (while (not (input-pending-p))
114 (message (format "We were zoning when we wrote %s..." pgm)) 120 (message (format "We were zoning when we wrote %s..." pgm))