Commit 02a89103 authored by Chong Yidong's avatar Chong Yidong
Browse files

* os.texi (Startup Summary): Copyedits. The init file is not

necessarily named .emacs now.  Document initial-buffer-choice and
initial-scratch-message.  Note where Emacs exits in batch mode.
Document inhibit-splash-screen as an alias.
(Init File): Be neutral about which init file name to use.
parent 705af33f
2009-04-20 Chong Yidong <cyd@stupidchicken.com>
* os.texi (Startup Summary): Copyedits. The init file is not
necessarily named .emacs now. Document initial-buffer-choice and
initial-scratch-message. Note where Emacs exits in batch mode.
Document inhibit-splash-screen as an alias.
(Init File): Be neutral about which init file name to use.
2009-04-16 Chong Yidong <cyd@stupidchicken.com>
* os.texi (System Interface): Fix Texinfo usage.
2009-04-15 Chong Yidong <cyd@stupidchicken.com> 2009-04-15 Chong Yidong <cyd@stupidchicken.com>
* searching.texi (Regexp Backslash): Also refer to shy groups as * searching.texi (Regexp Backslash): Also refer to shy groups as
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
values in the operating system environment, and terminal input, output, values in the operating system environment, and terminal input, output,
and flow control. and flow control.
@xref{Building Emacs}, for related information. See also @xref{Building Emacs}, for related information. @xref{Display}, for
@ref{Display}, for additional operating system status information additional operating system status information pertaining to the
pertaining to the terminal and the screen. terminal and the screen.
@menu @menu
* Starting Up:: Customizing Emacs startup processing. * Starting Up:: Customizing Emacs startup processing.
...@@ -46,7 +46,7 @@ can customize these actions. ...@@ -46,7 +46,7 @@ can customize these actions.
@menu @menu
* Startup Summary:: Sequence of actions Emacs performs at startup. * Startup Summary:: Sequence of actions Emacs performs at startup.
* Init File:: Details on reading the init file (@file{.emacs}). * Init File:: Details on reading the init file.
* Terminal-Specific:: How the terminal-specific Lisp file is read. * Terminal-Specific:: How the terminal-specific Lisp file is read.
* Command-Line Arguments:: How command-line arguments are processed, * Command-Line Arguments:: How command-line arguments are processed,
and how you can customize them. and how you can customize them.
...@@ -58,23 +58,23 @@ can customize these actions. ...@@ -58,23 +58,23 @@ can customize these actions.
@cindex startup of Emacs @cindex startup of Emacs
@cindex @file{startup.el} @cindex @file{startup.el}
The order of operations performed (in @file{startup.el}) by Emacs when When Emacs is started up, it performs the following operations
it is started up is as follows: (which are defined in @file{startup.el}):
@enumerate @enumerate
@item @item
It adds subdirectories to @code{load-path}, by running the file named It adds subdirectories to @code{load-path}, by running the file named
@file{subdirs.el} in each directory in the list. Normally this file @file{subdirs.el} in each directory in the list. Normally, this file
adds the directory's subdirectories to the list, and these will be adds the directory's subdirectories to the list, and those are scanned
scanned in their turn. The files @file{subdirs.el} are normally in their turn. The files @file{subdirs.el} are normally generated
generated automatically by Emacs installation. automatically when Emacs is installed.
@vindex before-init-time @vindex before-init-time
@item @item
It records in the variable @code{before-init-time} the value of It sets the variable @code{before-init-time} to the value of
@code{current-time} (@pxref{Time of Day}). It also sets @code{current-time} (@pxref{Time of Day}). It also sets
@code{after-init-time} to @code{nil}, so as to signal Lisp programs @code{after-init-time} to @code{nil}, which signals to Lisp programs
that Emacs initialization is in progress. that Emacs is being initialized.
@vindex initial-window-system@r{, and startup} @vindex initial-window-system@r{, and startup}
@vindex window-system-initialization-alist @vindex window-system-initialization-alist
...@@ -85,8 +85,8 @@ initial-window-system}). This library's name is ...@@ -85,8 +85,8 @@ initial-window-system}). This library's name is
@file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the @file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the
value of @code{initial-window-system}. From that library, it calls value of @code{initial-window-system}. From that library, it calls
the appropriate initialization function. The initialization function the appropriate initialization function. The initialization function
is specified by @code{window-system-initialization-alist}, for each for each supported window system is specified by
supported window system. @code{window-system-initialization-alist}.
@item @item
It sets the language environment and the terminal coding system, It sets the language environment and the terminal coding system,
...@@ -104,58 +104,49 @@ It initializes the window frame and faces, if appropriate, and turns ...@@ -104,58 +104,49 @@ It initializes the window frame and faces, if appropriate, and turns
on the menu bar and tool bar, if the initial frame needs them. on the menu bar and tool bar, if the initial frame needs them.
@item @item
It registers the default colors for text-only terminals. It loads the library @file{site-start}, if it exists. This is not
done if the options @samp{-Q} or @samp{--no-site-file} were specified.
@item
It loads the library @file{site-start} (if any), unless the option
@samp{-Q} (or @samp{--no-site-file}) was specified. The library's file
name is usually @file{site-start.el}.
@cindex @file{site-start.el} @cindex @file{site-start.el}
@item @item
It loads your init file (usually @file{~/.emacs}), unless the option It loads your init file (@pxref{Init File}). This is not done if the
@samp{-q} (or @samp{--no-init-file}), @samp{-Q}, or @samp{--batch} was options @samp{-q}, @samp{-Q}, or @samp{--batch} were specified. If
specified on the command line. The @samp{-u} option can specify the @samp{-u} option was specified, Emacs looks for the init file in
another user whose home directory should be used instead of @file{~}. that user's home directory instead.
@item @item
It loads the library @file{default} (if any), unless It loads the library @file{default}, if it exists. This is not done
@code{inhibit-default-init} is non-@code{nil}. (This is not done in if @code{inhibit-default-init} is non-@code{nil}, nor if the options
@samp{-batch} mode, or if @samp{-Q} or @samp{-q} was specified on the @samp{-q}, @samp{-Q}, or @samp{--batch} were specified.
command line.) The library's file name is usually @file{default.el}.
@cindex @file{default.el} @cindex @file{default.el}
@item @item
It loads your abbrevs from the file specified by It loads your abbrevs from the file specified by
@code{abbrev-file-name} (@pxref{Abbrev Files, abbrev-file-name}), if @code{abbrev-file-name}, if that file exists and can be read
that file exists and can be read. (This is not done in @samp{-batch} (@pxref{Abbrev Files, abbrev-file-name}). This is not done if the
mode.) option @samp{--batch} was specified.
@vindex after-init-time @vindex after-init-time
@item @item
It records in the variable @code{after-init-time} the value of It sets the variable @code{after-init-time} to the value of
@code{current-time}. This variable was set to @code{nil} at the @code{current-time}. This variable was set to @code{nil} earlier;
beginning of the Emacs session initialization (see above), so setting setting it to the current time signals that the initialization phase
it to the current time both signals that the initialization phase is is over, and, together with @code{before-init-time}, provides the
over, and, together with @code{before-init-time}, provides the
measurement of how long it took. measurement of how long it took.
@item @item
It runs the normal hook @code{after-init-hook}. It runs the normal hook @code{after-init-hook}.
@item @item
It sets the major mode according to @code{initial-major-mode}, provided If the buffer @samp{*scratch*} exists and is still in Fundamental mode
the buffer @samp{*scratch*} is still current and still in Fundamental (as it should be by default), it sets its major mode according to
mode. @code{initial-major-mode}.
@item @item
It loads the terminal-specific Lisp library, if any, except when in If started on a text-only terminal, it loads the terminal-specific
batch mode or when the variable @code{initial-window-system} (see Lisp library, which is specified by the variable
above) specifies a non-@code{nil} window system. The name of this @code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done
library is computed from the value of the variable in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
@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 @item
It displays the initial echo area message, unless you have suppressed It displays the initial echo area message, unless you have suppressed
...@@ -164,6 +155,14 @@ that with @code{inhibit-startup-echo-area-message}. ...@@ -164,6 +155,14 @@ that with @code{inhibit-startup-echo-area-message}.
@item @item
It processes the action arguments from the command line. It processes the action arguments from the command line.
@item
It now exits if the option @code{--batch} was specified.
@item
If @code{initial-buffer-choice} is a string, it visits the file with
that name. Furthermore, if the @samp{*scratch*} buffer exists and is
empty, it inserts @code{initial-scratch-message} into that buffer.
@item @item
It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. It runs @code{emacs-startup-hook} and then @code{term-setup-hook}.
...@@ -176,14 +175,16 @@ specify. ...@@ -176,14 +175,16 @@ specify.
It runs @code{window-setup-hook}. @xref{Window Systems}. It runs @code{window-setup-hook}. @xref{Window Systems}.
@item @item
It displays copyleft, nonwarranty, and basic use information, provided If the option @code{--daemon} was specified, it calls
the value of @code{inhibit-startup-screen} is @code{nil}, you didn't @code{server-start} and detaches from the controlling terminal.
specify @samp{--no-splash} or @samp{-Q}. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
@item @item
If the command-line arguments specified @option{--daemon}, @c FIXME: xref It displays the @dfn{startup screen}, which is a special buffer that
it calls @code{server-start} (@pxref{Emacs Server,,, emacs, The GNU contains information about copyleft and basic Emacs usage. This is
Emacs Manual}). not done if @code{initial-buffer-choice} or
@code{inhibit-startup-screen} are @code{nil}, nor if the
@samp{--no-splash} or @samp{-Q} command-line options were specified.
@item @item
If started by the X session manager, it calls If started by the X session manager, it calls
...@@ -192,17 +193,24 @@ previous session. @c FIXME: add an xref to the Emacs manual! ...@@ -192,17 +193,24 @@ previous session. @c FIXME: add an xref to the Emacs manual!
@end enumerate @end enumerate
@defopt inhibit-startup-screen @defopt inhibit-startup-screen
This variable inhibits the initial startup messages (the nonwarranty, This variable, if non-@code{nil}, inhibits the startup screen. In
etc.). If it is non-@code{nil}, then the messages are not printed. that case, Emacs typically displays the @samp{*scratch*} buffer; but
see @code{initial-buffer-choice}, below.
This variable exists so you can set it in your personal init file, once Do not set this variable in the init file of a new user, or in a way
you are familiar with the contents of the startup message. Do not set that affects more than one user, as that would prevent new users from
this variable in the init file of a new user, or in a way that affects receiving information about copyleft and basic Emacs usage.
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 @code{inhibit-startup-message} and @code{inhibit-splash-screen} are
back-compatibility. aliases for this variable.
@end defopt
@defopt initial-buffer-choice
This variable, if non-@code{nil}, determines a file or buffer for
Emacs to display after starting up, instead of the startup screen. If
its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. If
its value is a string, that specifies the name of a file for Emacs to
visit.
@end defopt @end defopt
@defopt inhibit-startup-echo-area-message @defopt inhibit-startup-echo-area-message
...@@ -219,11 +227,15 @@ Emacs explicitly checks for an expression as shown above in your init ...@@ -219,11 +227,15 @@ Emacs explicitly checks for an expression as shown above in your init
file; your login name must appear in the expression as a Lisp string file; your login name must appear in the expression as a Lisp string
constant. Other methods of setting constant. Other methods of setting
@code{inhibit-startup-echo-area-message} to the same value do not @code{inhibit-startup-echo-area-message} to the same value do not
inhibit the startup message. inhibit the startup message. This way, you can easily inhibit the
message for yourself if you wish, but thoughtless copying of your init
file will not inhibit the message for someone else.
@end defopt
This way, you can easily inhibit the message for yourself if you wish, @defopt initial-scratch-message
but thoughtless copying of your init file will not inhibit the message This variable, if non-@code{nil}, should be a string, which is
for someone else. inserted into the @samp{*scratch*} buffer when Emacs starts up. If it
is @code{nil}, the @samp{*scratch*} buffer is empty.
@end defopt @end defopt
@node Init File @node Init File
...@@ -232,12 +244,12 @@ for someone else. ...@@ -232,12 +244,12 @@ for someone else.
@cindex @file{.emacs} @cindex @file{.emacs}
When you start Emacs, it normally attempts to load your @dfn{init When you start Emacs, it normally attempts to load your @dfn{init
file}, a file in your home directory. Its normal name is file}. This is either a file named @file{.emacs} or @file{.emacs.el}
@file{.emacs}, but you can also call it @file{.emacs.el}. in your home directory, or a file named @file{init.el} in a
Alternatively, you can use a file named @file{init.el} in a subdirectory named @file{.emacs.d} in your home directory. Whichever
subdirectory @file{.emacs.d}. Whichever place you use, you can also place you use, you can also compile the file (@pxref{Byte
compile the file (@pxref{Byte Compilation}); then the actual file Compilation}); then the actual file loaded will be @file{.emacs.elc}
loaded will be @file{.emacs.elc} or @file{init.elc}. or @file{init.elc}.
The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u} The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u}
control whether and where to find the init file; @samp{-q} (and the control whether and where to find the init file; @samp{-q} (and the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment