changeset 36750:83e8e419d94d

(life): Rearrange code so that all calls to life-display-generation are in a catch-form.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 12 Mar 2001 16:44:56 +0000
parents ed71c7411538
children 20601d1f051c
files lisp/play/life.el
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/play/life.el	Mon Mar 12 16:39:22 2001 +0000
+++ b/lisp/play/life.el	Mon Mar 12 16:44:56 2001 +0000
@@ -1,6 +1,6 @@
 ;;; life.el --- John Horton Conway's `Life' game for GNU Emacs
 
-;; Copyright (C) 1988 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001 Free Software Foundation, Inc.
 
 ;; Author: Kyle Jones <kyleuunet.uu.net>
 ;; Keywords: games
@@ -106,14 +106,13 @@
   (setq life-initialized t)
   (or sleeptime (setq sleeptime 1))
   (life-setup)
-  (life-display-generation sleeptime)
   (catch 'life-exit
     (while t
       (let ((inhibit-quit t))
+	(life-display-generation sleeptime)
 	(life-grim-reaper)
 	(life-expand-plane-if-needed)
-	(life-increment-generation)
-	(life-display-generation sleeptime)))))
+	(life-increment-generation)))))
 
 (defalias 'life-mode 'life)
 (put 'life-mode 'mode-class 'special)