emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/play/zone.el


From: Thien-Thi Nguyen
Subject: [Emacs-diffs] Changes to emacs/lisp/play/zone.el
Date: Thu, 16 Dec 2004 12:20:05 -0500

Index: emacs/lisp/play/zone.el
diff -c emacs/lisp/play/zone.el:1.15 emacs/lisp/play/zone.el:1.16
*** emacs/lisp/play/zone.el:1.15        Wed Dec 15 13:56:36 2004
--- emacs/lisp/play/zone.el     Thu Dec 16 17:08:34 2004
***************
*** 152,159 ****
      (set-window-point (selected-window) wp)
      (sit-for 0 500)
      (let ((pgm (elt zone-programs (random (length zone-programs))))
!           (ct (and f (frame-parameter f 'cursor-type))))
!       (when ct (modify-frame-parameters f '((cursor-type . (bar . 0)))))
        (condition-case nil
            (progn
              (message "Zoning... (%s)" pgm)
--- 152,166 ----
      (set-window-point (selected-window) wp)
      (sit-for 0 500)
      (let ((pgm (elt zone-programs (random (length zone-programs))))
!           (ct (and f (frame-parameter f 'cursor-type)))
!           (restore (list '(kill-buffer outbuf))))
!       (when ct
!         (modify-frame-parameters f '((cursor-type . (bar . 0))))
!         (setq restore (cons '(modify-frame-parameters
!                               f (list (cons 'cursor-type ct)))
!                             restore)))
!       ;; Make `restore' a self-disabling one-shot thunk.
!       (setq restore `(lambda () ,@restore (setq restore nil)))
        (condition-case nil
            (progn
              (message "Zoning... (%s)" pgm)
***************
*** 167,180 ****
              (zone-call pgm)
              (message "Zoning...sorry"))
          (error
           (while (not (input-pending-p))
             (message (format "We were zoning when we wrote %s..." pgm))
             (sit-for 3)
             (message "...here's hoping we didn't hose your buffer!")
             (sit-for 3)))
!         (quit (ding) (message "Zoning...sorry")))
!       (when ct (modify-frame-parameters f (list (cons 'cursor-type ct)))))
!     (kill-buffer outbuf)))
  
  ;;;; Zone when idle, or not.
  
--- 174,190 ----
              (zone-call pgm)
              (message "Zoning...sorry"))
          (error
+          (funcall restore)
           (while (not (input-pending-p))
             (message (format "We were zoning when we wrote %s..." pgm))
             (sit-for 3)
             (message "...here's hoping we didn't hose your buffer!")
             (sit-for 3)))
!         (quit
!          (funcall restore)
!          (ding)
!          (message "Zoning...sorry")))
!       (when restore (funcall restore)))))
  
  ;;;; Zone when idle, or not.
  
***************
*** 659,665 ****
        (end-of-line 0)
        (forward-char -10))
      (let ((life-patterns (vector
!                           (if (and col (re-search-forward "[^ ]" max t))
                                (cons (make-string (length (car col)) 32) col)
                              (list (mapconcat 'identity
                                               (make-list (/ (- rtc 11) 15)
--- 669,675 ----
        (end-of-line 0)
        (forward-char -10))
      (let ((life-patterns (vector
!                           (if (and col (search-forward "@" max t))
                                (cons (make-string (length (car col)) 32) col)
                              (list (mapconcat 'identity
                                               (make-list (/ (- rtc 11) 15)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]