Mercurial > emacs
comparison lisp/type-break.el @ 90737:95d0cdf160ea
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 586-614)
- Update from CVS
- Update from erc--emacs--22
- Merge from gnus--rel--5.10
- Merge from erc--main--0
- Make byte compiler correctly write circular constants
* gnus--rel--5.10 (patch 186-196)
- Update from CVS
- Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-162
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 26 Jan 2007 06:16:11 +0000 |
parents | f1d13e615070 e3694f1cb928 |
children | f83d17e1ace6 |
comparison
equal
deleted
inserted
replaced
90736:ef1369583937 | 90737:95d0cdf160ea |
---|---|
1 ;;; type-break.el --- encourage rests from typing at appropriate intervals | 1 ;;; type-break.el --- encourage rests from typing at appropriate intervals |
2 | 2 |
3 ;; Copyright (C) 1994, 1995, 1997, 2000, 2001, 2002, 2003, | 3 ;; Copyright (C) 1994, 1995, 1997, 2000, 2001, 2002, 2003, |
4 ;; 2004, 2005, 2006 Free Software Foundation, Inc. | 4 ;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Noah Friedman | 6 ;; Author: Noah Friedman |
7 ;; Maintainer: Noah Friedman <friedman@splode.com> | 7 ;; Maintainer: Noah Friedman <friedman@splode.com> |
8 ;; Keywords: extensions, timers | 8 ;; Keywords: extensions, timers |
9 ;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs | 9 ;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs |
1129 (kill-buffer "*Hanoi*")) | 1129 (kill-buffer "*Hanoi*")) |
1130 (condition-case () | 1130 (condition-case () |
1131 (progn | 1131 (progn |
1132 (hanoi (/ (window-width) 8)) | 1132 (hanoi (/ (window-width) 8)) |
1133 ;; Wait for user to come back. | 1133 ;; Wait for user to come back. |
1134 (read-char) | 1134 (read-event) |
1135 (kill-buffer "*Hanoi*")) | 1135 (kill-buffer "*Hanoi*")) |
1136 (quit | 1136 (quit |
1137 ;; eat char | 1137 (read-event) |
1138 (read-char) | |
1139 (and (get-buffer "*Hanoi*") | 1138 (and (get-buffer "*Hanoi*") |
1140 (kill-buffer "*Hanoi*"))))) | 1139 (kill-buffer "*Hanoi*"))))) |
1141 | 1140 |
1142 ;; This is a wrapper around life that calls it with a `sleep' arg to make | 1141 ;; This is a wrapper around life that calls it with a `sleep' arg to make |
1143 ;; it run a little more leisurely. | 1142 ;; it run a little more leisurely. |
1151 (kill-buffer "*Life*")) | 1150 (kill-buffer "*Life*")) |
1152 (condition-case () | 1151 (condition-case () |
1153 (progn | 1152 (progn |
1154 (life 3) | 1153 (life 3) |
1155 ;; wait for user to return | 1154 ;; wait for user to return |
1156 (read-char) | 1155 (read-event) |
1157 (kill-buffer "*Life*")) | 1156 (kill-buffer "*Life*")) |
1158 (life-extinct | 1157 (life-extinct |
1159 (message "%s" (get 'life-extinct 'error-message)) | 1158 (message "%s" (get 'life-extinct 'error-message)) |
1160 (sit-for 3) | |
1161 ;; restart demo | 1159 ;; restart demo |
1162 (setq continue t)) | 1160 (setq continue t)) |
1163 (quit | 1161 (quit |
1164 (and (get-buffer "*Life*") | 1162 (and (get-buffer "*Life*") |
1165 (kill-buffer "*Life*"))))))) | 1163 (kill-buffer "*Life*"))))))) |
1244 (make-string (/ (- (window-width) (length message)) 2) | 1242 (make-string (/ (- (window-width) (length message)) 2) |
1245 ?\ ) | 1243 ?\ ) |
1246 message)))) | 1244 message)))) |
1247 (goto-char (point-min)) | 1245 (goto-char (point-min)) |
1248 (sit-for 60)) | 1246 (sit-for 60)) |
1249 (read-char) | 1247 (read-event) |
1250 (kill-buffer buffer-name)) | 1248 (kill-buffer buffer-name)) |
1251 (quit | 1249 (quit |
1252 (and (get-buffer buffer-name) | 1250 (and (get-buffer buffer-name) |
1253 (kill-buffer buffer-name)))))) | 1251 (kill-buffer buffer-name)))))) |
1254 | 1252 |