aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-04-20 01:34:27 +0000
committerChong Yidong2009-04-20 01:34:27 +0000
commit02a8910302278075db62124e69e1fb0de7dcc9f7 (patch)
treefb869fa32b1048f8e6969223a23aaa86629b7650
parent705af33f7ed44c4cc71165d45836f0b5a769f27d (diff)
downloademacs-02a8910302278075db62124e69e1fb0de7dcc9f7.tar.gz
emacs-02a8910302278075db62124e69e1fb0de7dcc9f7.zip
* 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.
-rw-r--r--doc/lispref/ChangeLog12
-rw-r--r--doc/lispref/os.texi156
2 files changed, 96 insertions, 72 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index f5f7727daf7..bc9d3a4c9e9 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,15 @@
12009-04-20 Chong Yidong <cyd@stupidchicken.com>
2
3 * os.texi (Startup Summary): Copyedits. The init file is not
4 necessarily named .emacs now. Document initial-buffer-choice and
5 initial-scratch-message. Note where Emacs exits in batch mode.
6 Document inhibit-splash-screen as an alias.
7 (Init File): Be neutral about which init file name to use.
8
92009-04-16 Chong Yidong <cyd@stupidchicken.com>
10
11 * os.texi (System Interface): Fix Texinfo usage.
12
12009-04-15 Chong Yidong <cyd@stupidchicken.com> 132009-04-15 Chong Yidong <cyd@stupidchicken.com>
2 14
3 * searching.texi (Regexp Backslash): Also refer to shy groups as 15 * searching.texi (Regexp Backslash): Also refer to shy groups as
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index c5f0bdb6ffa..041e23a810b 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -11,9 +11,9 @@
11values in the operating system environment, and terminal input, output, 11values in the operating system environment, and terminal input, output,
12and flow control. 12and flow control.
13 13
14 @xref{Building Emacs}, for related information. See also 14 @xref{Building Emacs}, for related information. @xref{Display}, for
15@ref{Display}, for additional operating system status information 15additional operating system status information pertaining to the
16pertaining to the terminal and the screen. 16terminal and the screen.
17 17
18@menu 18@menu
19* Starting Up:: Customizing Emacs startup processing. 19* Starting Up:: Customizing Emacs startup processing.
@@ -46,7 +46,7 @@ can customize these actions.
46 46
47@menu 47@menu
48* Startup Summary:: Sequence of actions Emacs performs at startup. 48* Startup Summary:: Sequence of actions Emacs performs at startup.
49* Init File:: Details on reading the init file (@file{.emacs}). 49* Init File:: Details on reading the init file.
50* Terminal-Specific:: How the terminal-specific Lisp file is read. 50* Terminal-Specific:: How the terminal-specific Lisp file is read.
51* Command-Line Arguments:: How command-line arguments are processed, 51* Command-Line Arguments:: How command-line arguments are processed,
52 and how you can customize them. 52 and how you can customize them.
@@ -58,23 +58,23 @@ can customize these actions.
58@cindex startup of Emacs 58@cindex startup of Emacs
59@cindex @file{startup.el} 59@cindex @file{startup.el}
60 60
61 The order of operations performed (in @file{startup.el}) by Emacs when 61 When Emacs is started up, it performs the following operations
62it is started up is as follows: 62(which are defined in @file{startup.el}):
63 63
64@enumerate 64@enumerate
65@item 65@item
66It adds subdirectories to @code{load-path}, by running the file named 66It adds subdirectories to @code{load-path}, by running the file named
67@file{subdirs.el} in each directory in the list. Normally this file 67@file{subdirs.el} in each directory in the list. Normally, this file
68adds the directory's subdirectories to the list, and these will be 68adds the directory's subdirectories to the list, and those are scanned
69scanned in their turn. The files @file{subdirs.el} are normally 69in their turn. The files @file{subdirs.el} are normally generated
70generated automatically by Emacs installation. 70automatically when Emacs is installed.
71 71
72@vindex before-init-time 72@vindex before-init-time
73@item 73@item
74It records in the variable @code{before-init-time} the value of 74It sets the variable @code{before-init-time} to the value of
75@code{current-time} (@pxref{Time of Day}). It also sets 75@code{current-time} (@pxref{Time of Day}). It also sets
76@code{after-init-time} to @code{nil}, so as to signal Lisp programs 76@code{after-init-time} to @code{nil}, which signals to Lisp programs
77that Emacs initialization is in progress. 77that Emacs is being initialized.
78 78
79@vindex initial-window-system@r{, and startup} 79@vindex initial-window-system@r{, and startup}
80@vindex window-system-initialization-alist 80@vindex window-system-initialization-alist
@@ -85,8 +85,8 @@ initial-window-system}). This library's name is
85@file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the 85@file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the
86value of @code{initial-window-system}. From that library, it calls 86value of @code{initial-window-system}. From that library, it calls
87the appropriate initialization function. The initialization function 87the appropriate initialization function. The initialization function
88is specified by @code{window-system-initialization-alist}, for each 88for each supported window system is specified by
89supported window system. 89@code{window-system-initialization-alist}.
90 90
91@item 91@item
92It sets the language environment and the terminal coding system, 92It sets the language environment and the terminal coding system,
@@ -104,58 +104,49 @@ It initializes the window frame and faces, if appropriate, and turns
104on the menu bar and tool bar, if the initial frame needs them. 104on the menu bar and tool bar, if the initial frame needs them.
105 105
106@item 106@item
107It registers the default colors for text-only terminals. 107It loads the library @file{site-start}, if it exists. This is not
108 108done if the options @samp{-Q} or @samp{--no-site-file} were specified.
109@item
110It loads the library @file{site-start} (if any), unless the option
111@samp{-Q} (or @samp{--no-site-file}) was specified. The library's file
112name is usually @file{site-start.el}.
113@cindex @file{site-start.el} 109@cindex @file{site-start.el}
114 110
115@item 111@item
116It loads your init file (usually @file{~/.emacs}), unless the option 112It loads your init file (@pxref{Init File}). This is not done if the
117@samp{-q} (or @samp{--no-init-file}), @samp{-Q}, or @samp{--batch} was 113options @samp{-q}, @samp{-Q}, or @samp{--batch} were specified. If
118specified on the command line. The @samp{-u} option can specify 114the @samp{-u} option was specified, Emacs looks for the init file in
119another user whose home directory should be used instead of @file{~}. 115that user's home directory instead.
120 116
121@item 117@item
122It loads the library @file{default} (if any), unless 118It loads the library @file{default}, if it exists. This is not done
123@code{inhibit-default-init} is non-@code{nil}. (This is not done in 119if @code{inhibit-default-init} is non-@code{nil}, nor if the options
124@samp{-batch} mode, or if @samp{-Q} or @samp{-q} was specified on the 120@samp{-q}, @samp{-Q}, or @samp{--batch} were specified.
125command line.) The library's file name is usually @file{default.el}.
126@cindex @file{default.el} 121@cindex @file{default.el}
127 122
128@item 123@item
129It loads your abbrevs from the file specified by 124It loads your abbrevs from the file specified by
130@code{abbrev-file-name} (@pxref{Abbrev Files, abbrev-file-name}), if 125@code{abbrev-file-name}, if that file exists and can be read
131that file exists and can be read. (This is not done in @samp{-batch} 126(@pxref{Abbrev Files, abbrev-file-name}). This is not done if the
132mode.) 127option @samp{--batch} was specified.
133 128
134@vindex after-init-time 129@vindex after-init-time
135@item 130@item
136It records in the variable @code{after-init-time} the value of 131It sets the variable @code{after-init-time} to the value of
137@code{current-time}. This variable was set to @code{nil} at the 132@code{current-time}. This variable was set to @code{nil} earlier;
138beginning of the Emacs session initialization (see above), so setting 133setting it to the current time signals that the initialization phase
139it to the current time both signals that the initialization phase is 134is over, and, together with @code{before-init-time}, provides the
140over, and, together with @code{before-init-time}, provides the
141measurement of how long it took. 135measurement of how long it took.
142 136
143@item 137@item
144It runs the normal hook @code{after-init-hook}. 138It runs the normal hook @code{after-init-hook}.
145 139
146@item 140@item
147It sets the major mode according to @code{initial-major-mode}, provided 141If the buffer @samp{*scratch*} exists and is still in Fundamental mode
148the buffer @samp{*scratch*} is still current and still in Fundamental 142(as it should be by default), it sets its major mode according to
149mode. 143@code{initial-major-mode}.
150 144
151@item 145@item
152It loads the terminal-specific Lisp library, if any, except when in 146If started on a text-only terminal, it loads the terminal-specific
153batch mode or when the variable @code{initial-window-system} (see 147Lisp library, which is specified by the variable
154above) specifies a non-@code{nil} window system. The name of this 148@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done
155library is computed from the value of the variable 149in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
156@code{term-file-prefix}; for the details, see @ref{Terminal-Specific}.
157
158If the value of @code{term-file-prefix} is @code{nil}, this step is skipped.
159 150
160@item 151@item
161It displays the initial echo area message, unless you have suppressed 152It displays the initial echo area message, unless you have suppressed
@@ -165,6 +156,14 @@ that with @code{inhibit-startup-echo-area-message}.
165It processes the action arguments from the command line. 156It processes the action arguments from the command line.
166 157
167@item 158@item
159It now exits if the option @code{--batch} was specified.
160
161@item
162If @code{initial-buffer-choice} is a string, it visits the file with
163that name. Furthermore, if the @samp{*scratch*} buffer exists and is
164empty, it inserts @code{initial-scratch-message} into that buffer.
165
166@item
168It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. 167It runs @code{emacs-startup-hook} and then @code{term-setup-hook}.
169 168
170@item 169@item
@@ -176,14 +175,16 @@ specify.
176It runs @code{window-setup-hook}. @xref{Window Systems}. 175It runs @code{window-setup-hook}. @xref{Window Systems}.
177 176
178@item 177@item
179It displays copyleft, nonwarranty, and basic use information, provided 178If the option @code{--daemon} was specified, it calls
180the value of @code{inhibit-startup-screen} is @code{nil}, you didn't 179@code{server-start} and detaches from the controlling terminal.
181specify @samp{--no-splash} or @samp{-Q}. 180@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
182 181
183@item 182@item
184If the command-line arguments specified @option{--daemon}, @c FIXME: xref 183It displays the @dfn{startup screen}, which is a special buffer that
185it calls @code{server-start} (@pxref{Emacs Server,,, emacs, The GNU 184contains information about copyleft and basic Emacs usage. This is
186Emacs Manual}). 185not done if @code{initial-buffer-choice} or
186@code{inhibit-startup-screen} are @code{nil}, nor if the
187@samp{--no-splash} or @samp{-Q} command-line options were specified.
187 188
188@item 189@item
189If started by the X session manager, it calls 190If started by the X session manager, it calls
@@ -192,17 +193,24 @@ previous session. @c FIXME: add an xref to the Emacs manual!
192@end enumerate 193@end enumerate
193 194
194@defopt inhibit-startup-screen 195@defopt inhibit-startup-screen
195This variable inhibits the initial startup messages (the nonwarranty, 196This variable, if non-@code{nil}, inhibits the startup screen. In
196etc.). If it is non-@code{nil}, then the messages are not printed. 197that case, Emacs typically displays the @samp{*scratch*} buffer; but
198see @code{initial-buffer-choice}, below.
197 199
198This variable exists so you can set it in your personal init file, once 200Do not set this variable in the init file of a new user, or in a way
199you are familiar with the contents of the startup message. Do not set 201that affects more than one user, as that would prevent new users from
200this variable in the init file of a new user, or in a way that affects 202receiving information about copyleft and basic Emacs usage.
201more than one user, because that would prevent new users from receiving
202the information they are supposed to see.
203 203
204@code{inhibit-startup-message} is an alias for this variable, for 204@code{inhibit-startup-message} and @code{inhibit-splash-screen} are
205back-compatibility. 205aliases for this variable.
206@end defopt
207
208@defopt initial-buffer-choice
209This variable, if non-@code{nil}, determines a file or buffer for
210Emacs to display after starting up, instead of the startup screen. If
211its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. If
212its value is a string, that specifies the name of a file for Emacs to
213visit.
206@end defopt 214@end defopt
207 215
208@defopt inhibit-startup-echo-area-message 216@defopt inhibit-startup-echo-area-message
@@ -219,11 +227,15 @@ Emacs explicitly checks for an expression as shown above in your init
219file; your login name must appear in the expression as a Lisp string 227file; your login name must appear in the expression as a Lisp string
220constant. Other methods of setting 228constant. Other methods of setting
221@code{inhibit-startup-echo-area-message} to the same value do not 229@code{inhibit-startup-echo-area-message} to the same value do not
222inhibit the startup message. 230inhibit the startup message. This way, you can easily inhibit the
231message for yourself if you wish, but thoughtless copying of your init
232file will not inhibit the message for someone else.
233@end defopt
223 234
224This way, you can easily inhibit the message for yourself if you wish, 235@defopt initial-scratch-message
225but thoughtless copying of your init file will not inhibit the message 236This variable, if non-@code{nil}, should be a string, which is
226for someone else. 237inserted into the @samp{*scratch*} buffer when Emacs starts up. If it
238is @code{nil}, the @samp{*scratch*} buffer is empty.
227@end defopt 239@end defopt
228 240
229@node Init File 241@node Init File
@@ -232,12 +244,12 @@ for someone else.
232@cindex @file{.emacs} 244@cindex @file{.emacs}
233 245
234 When you start Emacs, it normally attempts to load your @dfn{init 246 When you start Emacs, it normally attempts to load your @dfn{init
235file}, a file in your home directory. Its normal name is 247file}. This is either a file named @file{.emacs} or @file{.emacs.el}
236@file{.emacs}, but you can also call it @file{.emacs.el}. 248in your home directory, or a file named @file{init.el} in a
237Alternatively, you can use a file named @file{init.el} in a 249subdirectory named @file{.emacs.d} in your home directory. Whichever
238subdirectory @file{.emacs.d}. Whichever place you use, you can also 250place you use, you can also compile the file (@pxref{Byte
239compile the file (@pxref{Byte Compilation}); then the actual file 251Compilation}); then the actual file loaded will be @file{.emacs.elc}
240loaded will be @file{.emacs.elc} or @file{init.elc}. 252or @file{init.elc}.
241 253
242 The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u} 254 The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u}
243control whether and where to find the init file; @samp{-q} (and the 255control whether and where to find the init file; @samp{-q} (and the