aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/play/zone.el62
2 files changed, 40 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 239db44d00a..f19240b8840 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12001-08-03 Gerd Moellmann <gerd@gnu.org> 12001-08-03 Gerd Moellmann <gerd@gnu.org>
2 2
3 * play/zone.el (zone-pgm-stress): Use unwind-protect to make sure
4 the mode-line face is restored. Fix several bugs.
5
3 * replace.el (perform-replace): Doc fix. 6 * replace.el (perform-replace): Doc fix.
4 7
52001-08-02 Francesco Potorti` <pot@gnu.org> 82001-08-02 Francesco Potorti` <pot@gnu.org>
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 90e9361c580..5bc87faef10 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -1,6 +1,6 @@
1;;; zone.el --- idle display hacks 1;;; zone.el --- idle display hacks
2 2
3;; Copyright (C) 2000 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
4 4
5;; Author: Victor Zandy <zandy@cs.wisc.edu> 5;; Author: Victor Zandy <zandy@cs.wisc.edu>
6;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org> 6;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
@@ -526,35 +526,47 @@
526 526
527(defun zone-pgm-stress () 527(defun zone-pgm-stress ()
528 (goto-char (point-min)) 528 (goto-char (point-min))
529 (let (lines bg m-fg m-bg) 529 (let (lines bg mode-line-fg mode-line-bg mode-line-box)
530 (while (< (point) (point-max)) 530 (while (< (point) (point-max))
531 (let ((p (point))) 531 (let ((p (point)))
532 (forward-line 1) 532 (forward-line 1)
533 (setq lines (cons (buffer-substring p (point)) lines)))) 533 (setq lines (cons (buffer-substring p (point)) lines))))
534 (sit-for 5) 534 (sit-for 5)
535 (when (display-color-p) 535 (unwind-protect
536 (setq bg (frame-parameter (selected-frame) 'background-color) 536 (progn
537 m-fg (face-foreground 'modeline) 537 (when (display-color-p)
538 m-bg (face-background 'modeline)) 538 (setq bg (face-background 'default)
539 (set-face-foreground 'modeline bg) 539 mode-line-box (face-attribute 'mode-line :box)
540 (set-face-background 'modeline bg)) 540 mode-line-fg (face-attribute 'mode-line :foreground)
541 (let ((msg "Zoning... (zone-pgm-stress)")) 541 mode-line-bg (face-attribute 'mode-line :background))
542 (while (not (string= msg "")) 542 (set-face-attribute 'mode-line nil
543 (message (setq msg (substring msg 1))) 543 :foreground bg
544 (sit-for 0.05))) 544 :background bg
545 (while (not (input-pending-p)) 545 :box nil))
546 (when (< 50 (random 100)) 546
547 (goto-char (point-max)) 547 (let ((msg "Zoning... (zone-pgm-stress)"))
548 (forward-line -1) 548 (while (not (string= msg ""))
549 (let ((kill-whole-line t)) 549 (message (setq msg (substring msg 1)))
550 (kill-line)) 550 (sit-for 0.05)))
551 (goto-char (point-min)) 551
552 (insert (nth (random (length lines)) lines))) 552 (while (not (input-pending-p))
553 (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) 553 (when (< 50 (random 100))
554 (sit-for 0.1)) 554 (goto-char (point-max))
555 (when (display-color-p) 555 (forward-line -1)
556 (set-face-foreground 'modeline m-fg) 556 (unless (eobp)
557 (set-face-background 'modeline m-bg)))) 557 (let ((kill-whole-line t))
558 (kill-line)))
559 (goto-char (point-min))
560 (when lines
561 (insert (nth (random (1- (length lines))) lines))))
562 (message (concat (make-string (random (- (frame-width) 5)) ? )
563 "grrr"))
564 (sit-for 0.1)))
565 (when mode-line-fg
566 (set-face-attribute 'mode-line nil
567 :foreground mode-line-fg
568 :background mode-line-bg
569 :box mode-line-box)))))
558 570
559(provide 'zone) 571(provide 'zone)
560 572