all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Minor fix for life.el.
@ 2006-09-06 17:05 Michaël Cadilhac
  2006-09-06 18:03 ` David Kastrup
  0 siblings, 1 reply; 12+ messages in thread
From: Michaël Cadilhac @ 2006-09-06 17:05 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 301 bytes --]


I usually use M-x life with zero as numerical prefix (it's lot of fun).
M-0 M-x life RET

There's a little bug: when I hit a key, life goes into an infinite
loop (not MY life) and I have to C-g to stop this.

The following patch fixes this bug (sit-for is still called because he
causes redisplay).


[-- Attachment #1.1.2: life.patch --]
[-- Type: text/x-patch, Size: 1301 bytes --]

Index: lisp/play/life.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/play/life.el,v
retrieving revision 1.25
diff -c -r1.25 life.el
*** lisp/play/life.el	5 Feb 2006 14:10:44 -0000	1.25
--- lisp/play/life.el	6 Sep 2006 16:58:35 -0000
***************
*** 269,275 ****
    (recenter 0)
  
    ;; Redisplay; if the user has hit a key, exit the loop.
!   (or (eq t (sit-for sleeptime))
        (throw 'life-exit nil)))
  
  (defun life-extinct-quit ()
--- 269,276 ----
    (recenter 0)
  
    ;; Redisplay; if the user has hit a key, exit the loop.
!   (or (and (sit-for sleeptime) (< 0 sleeptime))
!       (not (input-pending-p))
        (throw 'life-exit nil)))
  
  (defun life-extinct-quit ()
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10003
diff -c -0 -r1.10003 ChangeLog
*** lisp/ChangeLog	6 Sep 2006 02:43:00 -0000	1.10003
--- lisp/ChangeLog	6 Sep 2006 16:58:48 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-09-06  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* play/life.el (life-display-generation): Test for input manually if
+ 	`sleeptime' is negative or null.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 330 bytes --]


TIA

-- 
 |      Michaël `Micha' Cadilhac   |  Si les religions etaient aussi tole-  |
 |         Epita/LRDE Promo 2007   |  rantes qu'elles le pretendent, il y   |
 | http://www.lrde.org/~cadilh_m   |  a longtemps qu'il n'y en aurait plus  |
 `--  -   JID: micha@amessage.be --'           -- Moustic              -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-09-11 14:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 17:05 Minor fix for life.el Michaël Cadilhac
2006-09-06 18:03 ` David Kastrup
2006-09-06 18:14   ` Michaël Cadilhac
2006-09-06 18:34     ` David Kastrup
2006-09-07 14:27       ` Broken sit-for [was: Re: Minor fix for life.el.] Kim F. Storm
2006-09-08  9:16         ` Broken sit-for Michaël Cadilhac
2006-09-09 23:02         ` Broken sit-for [was: Re: Minor fix for life.el.] Kim F. Storm
2006-09-10  0:28           ` Broken sit-for David Kastrup
2006-09-10  9:18             ` Michaël Cadilhac
2006-09-10 21:26               ` Kim F. Storm
2006-09-11 14:22                 ` Michaël Cadilhac
2006-09-10 21:06             ` Kim F. Storm

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.