# HG changeset patch # User Eli Zaretskii # Date 1224258051 0 # Node ID 1084bca8f9077513a51dc941be4a03f07712f100 # Parent 79058aa99a5da434760ce9f51ef6481196421c74 (Startup Summary): Document `before-init-time' and `after-init-time'. Document `initial-window-system' and `window-system-initialization-alist'. Document reading the abbrevs file. Document the call to `server-start' under --daemon. Rearrange a bit to be consistent with the code flow. diff -r 79058aa99a5d -r 1084bca8f907 doc/lispref/os.texi --- a/doc/lispref/os.texi Fri Oct 17 13:16:15 2008 +0000 +++ b/doc/lispref/os.texi Fri Oct 17 15:40:51 2008 +0000 @@ -69,24 +69,41 @@ scanned in their turn. The files @file{subdirs.el} are normally generated automatically by Emacs installation. +@vindex before-init-time +@item +It records in the variable @code{before-init-time} the value of +@code{current-time} (@pxref{Time of Day}). It also sets +@code{after-init-time} to @code{nil}, so as to signal Lisp programs +that Emacs initialization is in progress. + +@vindex initial-window-system@r{, and startup} +@vindex window-system-initialization-alist +@item +It loads the initialization library for the window system specified by +the variable @code{initial-window-system}. This library's name is +@file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the +value of @code{initial-window-system}. From that library, it calls +the appropriate initialization function. The initialization function +is specified by @code{window-system-initialization-alist}, for each +supported window system. + @item It sets the language environment and the terminal coding system, if requested by environment variables such as @code{LANG}. @item -It loads the initialization library for the window system, if you are -using a window system. This library's name is -@file{term/@var{windowsystem}-win.el}. - -@item It processes the initial options. (Some of them are handled even earlier than this.) @item -It initializes the window frame and faces, if appropriate. +It runs the normal hook @code{before-init-hook}. @item -It runs the normal hook @code{before-init-hook}. +It initializes the window frame and faces, if appropriate, and turns +on the menu bar and tool bar, if the initial frame needs them. + +@item +It registers the default colors for text-only terminals. @item It loads the library @file{site-start} (if any), unless the option @@ -108,6 +125,21 @@ @cindex @file{default.el} @item +It loads your abbrevs from the file specified by +@code{abbrev-file-name} (@pxref{Abbrev Files, abbrev-file-name}), if +that file exists and can be read. (This is not done in @samp{-batch} +mode.) + +@vindex after-init-time +@item +It records in the variable @code{after-init-time} the value of +@code{current-time}. This variable was set to @code{nil} at the +beginning of the Emacs session initialization (see above), so setting +it to the current time both signals that the initialization phase is +over, and, together with @code{before-init-time}, provides the +measurement of how long it took. + +@item It runs the normal hook @code{after-init-hook}. @item @@ -116,8 +148,13 @@ mode. @item -It loads the terminal-specific Lisp file, if any, except when in batch -mode or using a window system. +It loads the terminal-specific Lisp library, if any, except when in +batch mode or when the variable @code{initial-window-system} (see +above) specifies a non-@code{nil} window system. The name of this +library is computed from the value of the variable +@code{term-file-prefix}; for the details, see @ref{Terminal-Specific}. + +If the value of @code{term-file-prefix} is @code{nil}, this step is skipped. @item It displays the initial echo area message, unless you have suppressed @@ -139,11 +176,21 @@ @item It displays copyleft, nonwarranty, and basic use information, provided -the value of @code{inhibit-startup-message} is @code{nil}, you didn't +the value of @code{inhibit-startup-screen} is @code{nil}, you didn't specify @samp{--no-splash} or @samp{-Q}. + +@item +If the command-line arguments specified @option{--daemon}, @c FIXME: xref +it calls @code{server-start} (@pxref{Emacs Server,,, emacs, The GNU +Emacs Manual}). + +@item +If started by the X session manager, it calls +@code{emacs-session-restore} passing it as argument the ID of the +previous session. @c FIXME: add an xref to the Emacs manual! @end enumerate -@defopt inhibit-startup-message +@defopt inhibit-startup-screen This variable inhibits the initial startup messages (the nonwarranty, etc.). If it is non-@code{nil}, then the messages are not printed. @@ -152,6 +199,9 @@ this variable in the init file of a new user, or in a way that affects more than one user, because that would prevent new users from receiving the information they are supposed to see. + +@code{inhibit-startup-message} is an alias for this variable, for +back-compatibility. @end defopt @defopt inhibit-startup-echo-area-message