X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ad8d30b3d83547b1ac056cac3dd6e6721de8554e..aef88a00d364bbb208acff2d9b66b2a1eb6cf8f5:/lispref/os.texi diff --git a/lispref/os.texi b/lispref/os.texi index 479920ac83..49f47477ad 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, -@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +@c 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/os @node System Interface, Antinews, Display, Top @@ -54,7 +54,7 @@ can customize these actions. @node Startup Summary @subsection Summary: Sequence of Actions at Startup -@cindex initialization +@cindex initialization of Emacs @cindex startup of Emacs @cindex @file{startup.el} @@ -1421,20 +1421,15 @@ the timer runs only once. @var{time} may specify an absolute or a relative time. -Absolute times may be specified in a wide variety of formats; this -function tries to accept all the commonly used date formats. The most -convenient formats are strings. Valid such formats include these two, - -@example -@var{year}-@var{month}-@var{day} @var{hour}:@var{min}:@var{sec} @var{timezone} - -@var{hour}:@var{min}:@var{sec} @var{timezone} @var{month}/@var{day}/@var{year} -@end example - -@noindent -where in both examples all fields are numbers; the format that -@code{current-time-string} returns is also allowed, and many others -as well. +Absolute times may be specified using a string with a limited variety +of formats, and are taken to be times @emph{today}, even if already in +the past. The recognized forms are @samp{@var{xxxx}}, +@samp{@var{x}:@var{xx}}, or @samp{@var{xx}:@var{xx}} (military time), +and @samp{@var{xx}am}, @samp{@var{xx}AM}, @samp{@var{xx}pm}, +@samp{@var{xx}PM}, @samp{@var{xx}:@var{xx}am}, +@samp{@var{xx}:@var{xx}AM}, @samp{@var{xx}:@var{xx}pm}, or +@samp{@var{xx}:@var{xx}PM}. A period can be used instead of a colon +to separate the hour and minute parts. To specify a relative time as a string, use numbers followed by units. For example: @@ -1452,8 +1447,9 @@ For relative time values, Emacs considers a month to be exactly thirty days, and a year to be exactly 365.25 days. Not all convenient formats are strings. If @var{time} is a number -(integer or floating point), that specifies a relative time measured -in seconds. +(integer or floating point), that specifies a relative time measured in +seconds. The result of @code{encode-time} can also be used to specify +an absolute value for @var{time}. In most cases, @var{repeat} has no effect on when @emph{first} call takes place---@var{time} alone specifies that. There is one exception: @@ -1560,10 +1556,10 @@ set up to repeat will subsequently run another time, one by one. @c Emacs 19 feature @defun current-idle-time -This function returns the length of time Emacs has been idle, as a -list of three integers: @code{(@var{high} @var{low} @var{microsec})}. -The integers @var{high} and @var{low} combine to give the number of -seconds of idleness, which is +If Emacs is idle, this function returns the length of time Emacs has +been idle, as a list of three integers: @code{(@var{high} @var{low} +@var{microsec})}. The integers @var{high} and @var{low} combine to +give the number of seconds of idleness, which is @ifnottex @var{high} * 2**16 + @var{low}. @end ifnottex @@ -1575,6 +1571,9 @@ The third element, @var{microsec}, gives the microseconds since the start of the current second (or 0 for systems that return time with the resolution of only one second). +When Emacs is not idle, @code{current-idle-time} returns @code{nil}. +This is a convenient way to test whether Emacs is idle. + The main use of this function is when an idle timer function wants to ``take a break'' for a while. It can set up another idle timer to call the same function again, after a few seconds more idleness. @@ -1872,7 +1871,7 @@ is called with one argument, a property list that describes the sound. @node X11 Keysyms @section Operating on X11 Keysyms -@cindex x11 keysyms +@cindex X11 keysyms To define system-specific X11 keysyms, set the variable @code{system-key-alist}. @@ -1926,7 +1925,6 @@ how to swap the Meta and Alt modifiers within Emacs: @node Batch Mode @section Batch Mode @cindex batch mode -@cindex noninteractive use The command-line option @samp{-batch} causes Emacs to run noninteractively. In this mode, Emacs does not read commands from the