Mercurial > emacs
annotate lib-src/=wakeup.c @ 2077:6885836c2f98
(rmail-update-summary): New function.
(rmail-new-summary): New arg redo-form. Considerable rewrite
of how and when buffers are selected.
(rmail-summary-mode): New local vars rmail-summary-redo,
revert-buffer-function, post-command-hook, rmail-current-message.
(rmail-summary-expunge): Use rmail-update-summary.
(rmail-summary-get-new-mail): Likewise.
(rmail-summary-expunge-and-save): Likewise.
(rmail-summary-input): Don't update summary at all.
(rmail-summary-reply): Do the work inside save-window-excursion,
then switch to the mail buffer.
(rmail-summary-retry-failure): Likewise.
(rmail-summary-edit-current-message): Delete spurious autoload.
(rmail-summary-summary): Function deleted.
Use plain rmail-summary on h and C-M-h.
(rmail-summary-rmail-update): New function.
Big rewrite from weiner@pts.mot.com.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 09 Mar 1993 08:08:52 +0000 |
parents | f756ede77561 |
children | 44df7395bed8 |
rev | line source |
---|---|
77 | 1 /* Program to produce output at regular intervals. */ |
2 | |
3 #include <stdio.h> | |
4 #include <time.h> | |
5 | |
6 struct tm *localtime (); | |
7 | |
8 main (argc, argv) | |
9 int argc; | |
10 char **argv; | |
11 { | |
12 int period = 60; | |
13 long when; | |
14 struct tm *tp; | |
15 | |
16 if (argc > 1) | |
17 period = atoi (argv[1]); | |
18 | |
19 while (1) | |
20 { | |
366 | 21 /* Make sure wakeup stops when Emacs goes away. */ |
22 if (getppid () == 1) | |
23 exit (0); | |
77 | 24 printf ("Wake up!\n"); |
25 fflush (stdout); | |
26 /* If using a period of 60, produce the output when the minute | |
27 changes. */ | |
28 if (period == 60) | |
29 { | |
30 time (&when); | |
31 tp = localtime (&when); | |
32 sleep (60 - tp->tm_sec); | |
33 } | |
34 else | |
35 sleep (period); | |
36 } | |
37 } |