X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ca3fa30248b923c17c021c0fcdb945271d14e8c2..3726946669effb8c66c37fb5f9996178c9adfc80:/lisp/play/zone.el?ds=sidebyside diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 4fa5a8c392..34e2119343 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -1,7 +1,6 @@ ;;; zone.el --- idle display hacks -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2012 Free Software Foundation, Inc. ;; Author: Victor Zandy ;; Maintainer: Thien-Thi Nguyen @@ -31,9 +30,6 @@ ;; Bored by the zone pyrotechnics? Write your own! Add it to ;; `zone-programs'. See `zone-call' for higher-ordered zoning. -;; WARNING: Not appropriate for Emacs sessions over modems or -;; computers as slow as mine. - ;; THANKS: Christopher Mayer, Scott Flinchbaugh, ;; Rachel Kalmar, Max Froumentin, Juri Linkov, ;; Luigi Panzeri, John Paul Wallington. @@ -44,7 +40,7 @@ "The timer we use to decide when to zone out, or nil if none.") (defvar zone-timeout nil - "*Seconds to timeout the zoning. + "Seconds to timeout the zoning. If nil, don't interrupt for about 1^26 seconds.") ;; Vector of functions that zone out. `zone' will execute one of @@ -79,7 +75,7 @@ If nil, don't interrupt for about 1^26 seconds.") `(with-current-buffer (get 'zone 'orig-buffer) ,@body)) -(defmacro zone-hiding-modeline (&rest body) +(defmacro zone-hiding-mode-line (&rest body) ;; This formerly worked by temporarily altering face `mode-line', ;; which did not even work right, it seems. `(let (mode-line-format) @@ -117,7 +113,6 @@ If the element is a function or a list of a function and a number, (wp (1+ (- (window-point (selected-window)) (window-start))))) (put 'zone 'orig-buffer (current-buffer)) - (put 'zone 'modeline-hidden-level 0) (switch-to-buffer outbuf) (setq mode-name "Zone") (erase-buffer) @@ -587,7 +582,7 @@ If the element is a function or a list of a function and a number, (setq ok (zerop (forward-line 1)) lines (cons (buffer-substring p (point)) lines)))) (sit-for 5) - (zone-hiding-modeline + (zone-hiding-mode-line (let ((msg "Zoning... (zone-pgm-stress)")) (while (not (string= msg "")) (message (setq msg (substring msg 1))) @@ -596,8 +591,7 @@ If the element is a function or a list of a function and a number, (when (< 50 (random 100)) (goto-char (point-max)) (forward-line -1) - (let ((kill-whole-line t)) - (kill-line)) + (delete-region (point) (line-beginning-position 2)) (goto-char (point-min)) (insert (nth (random (length lines)) lines))) (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) @@ -605,7 +599,7 @@ If the element is a function or a list of a function and a number, (defun zone-pgm-stress-destress () (zone-call 'zone-pgm-stress 25) - (zone-hiding-modeline + (zone-hiding-mode-line (sit-for 3) (erase-buffer) (sit-for 3) @@ -624,9 +618,11 @@ If the element is a function or a list of a function and a number, ;;;; the lyfe so short the craft so long to lerne --chaucer (defvar zone-pgm-random-life-wait nil - "*Seconds to wait between successive `life' generations. + "Seconds to wait between successive `life' generations. If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") +(defvar life-patterns) ; from life.el + (defun zone-pgm-random-life () (require 'life) (zone-fill-out-screen (1- (window-width)) (1- (window-height))) @@ -684,5 +680,4 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") ;;;;;;;;;;;;;;; (provide 'zone) -;; arch-tag: 7092503d-74a9-4325-a55c-a026ede58cea ;;; zone.el ends here