Mercurial > hg > xemacs-beta
view lib-src/wakeup.c @ 4695:fee33ab25966
Add arglist info for autoloaded functions and macros.
lisp/ChangeLog addition:
2009-09-20 Aidan Kehoe <kehoea@parhasard.net>
Add arglist information to docstrings for autoloaded functions and
macros.
* hyper-apropos.el (hyper-apropos-get-doc):
Treat autoload docstrings like subr docstrings; correct the regexp
used.
* help.el (describe-function-show-arglist):
This no longer treats autoloads specially.
(function-arglist): Treat autoload docstrings like subr docstrings.
(function-documentation): Treat documentation strings that are
zero-length after the arglist has been removed as indicating a
lack of documentation.
* cl-macs.el (case):
(ecase):
(typecase):
(etypecase):
(block):
(return):
(return-from):
(progv):
(lexical-let):
(lexical-let*):
(remf):
(callf):
(callf2):
(define-modify-macro):
(deftype):
(define-compiler-macro):
Rely on the autoload code to always show an arglist for these
functions, don't supply an ad-hoc one in the docstring.
These changes are for the most obvious functions; there are some
missed that would require changing argument names in the docstring
or in the function bodies.
* autoload.el (make-autoload):
Add arg list information to the doc string, using the same
approach as for subrs.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 20 Sep 2009 23:50:05 +0100 |
parents | abe6d1db359e |
children |
line wrap: on
line source
/* Program to produce output at regular intervals. */ #include <config.h> #if __STDC__ || defined(STDC_HEADERS) #include <stdlib.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #endif #include <stdio.h> #include <sys/types.h> #ifdef WIN32_NATIVE #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef sleep #define sleep(t) Sleep ((t) * 1000) #define getppid() (0) #undef HAVE_SYS_TIME_H #endif /* WIN32_NATIVE */ #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> #include <time.h> #else #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #else #include <time.h> #endif #endif int main (int argc, char *argv[]) { int period = 60; if (argc > 1) period = atoi (argv[1]); while (1) { /* Make sure wakeup stops when Emacs goes away. */ if (getppid () == 1) return 0; printf ("Wake up!\n"); /* If fflush fails, then our stdout pipe is broken. */ if (fflush (stdout) != 0) return 0; /* If using a period of 60, produce the output when the minute changes. */ if (period == 60) { time_t when; struct tm *tp; time (&when); tp = localtime (&when); sleep (60 - tp->tm_sec); } else sleep (period); } }