From f36acfd9ec33f68f8364b87dfa0246e47cbdc365 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 17 Oct 2008 15:42:34 +0000 Subject: [PATCH] (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. --- doc/lispref/ChangeLog | 8 +++++ doc/lispref/os.texi | 72 ++++++++++++++++++++++++++++++++++++------- etc/NEWS | 7 +++++ 3 files changed, 76 insertions(+), 11 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 466ad79bc29..c0e27ea4712 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +2008-10-17 Eli Zaretskii + + * os.texi (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. + 2008-10-17 Martin Rudalics * windows.texi (Basic Windows, Splitting Windows): Fix whitespace diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 842cad72f62..fda4ed2c8a5 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -69,24 +69,41 @@ adds the directory's subdirectories to the list, and these will be scanned in their turn. The files @file{subdirs.el} are normally generated automatically by Emacs installation. +@vindex before-init-time @item -It sets the language environment and the terminal coding system, -if requested by environment variables such as @code{LANG}. +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, if you are -using a window system. This library's name is -@file{term/@var{windowsystem}-win.el}. +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 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 @@ -107,6 +124,21 @@ It loads the library @file{default} (if any), unless command line.) The library's file name is usually @file{default.el}. @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}. @@ -116,8 +148,13 @@ the buffer @samp{*scratch*} is still current and still in Fundamental 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 @@ It runs @code{window-setup-hook}. @xref{Window Systems}. @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 @@ you are familiar with the contents of the startup message. Do not set 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 diff --git a/etc/NEWS b/etc/NEWS index 727beb346cd..0653cda7c9e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -286,6 +286,12 @@ inside of --eval command line arguments in order to access following arguments. ** The abbrev file is no longer read at startup in batch mode. + +** Emacs now supports invocation by an X session manager. +It can save a session and restore it later. See the documentation of +the functions `emacs-session-save' and `emacs-session-restore'. +(Actually, this feature was introduced with Emacs 22, but it was not +documented.) * Incompatible Editing Changes in Emacs 23.1 @@ -1195,6 +1201,7 @@ reset transient-mark-mode to the value OLDVAL. The values `only' and ** Emacs session information ++++ *** The new variables `before-init-time' and `after-init-time' record the value of `current-time' before and after Emacs loads the init files. -- 2.39.5