diff options
| author | Chong Yidong | 2009-04-20 01:34:27 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-04-20 01:34:27 +0000 |
| commit | 02a8910302278075db62124e69e1fb0de7dcc9f7 (patch) | |
| tree | fb869fa32b1048f8e6969223a23aaa86629b7650 | |
| parent | 705af33f7ed44c4cc71165d45836f0b5a769f27d (diff) | |
| download | emacs-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/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 156 |
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 @@ | |||
| 1 | 2009-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 | |||
| 9 | 2009-04-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 10 | |||
| 11 | * os.texi (System Interface): Fix Texinfo usage. | ||
| 12 | |||
| 1 | 2009-04-15 Chong Yidong <cyd@stupidchicken.com> | 13 | 2009-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 @@ | |||
| 11 | values in the operating system environment, and terminal input, output, | 11 | values in the operating system environment, and terminal input, output, |
| 12 | and flow control. | 12 | and 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 | 15 | additional operating system status information pertaining to the |
| 16 | pertaining to the terminal and the screen. | 16 | terminal 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 |
| 62 | it is started up is as follows: | 62 | (which are defined in @file{startup.el}): |
| 63 | 63 | ||
| 64 | @enumerate | 64 | @enumerate |
| 65 | @item | 65 | @item |
| 66 | It adds subdirectories to @code{load-path}, by running the file named | 66 | It 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 |
| 68 | adds the directory's subdirectories to the list, and these will be | 68 | adds the directory's subdirectories to the list, and those are scanned |
| 69 | scanned in their turn. The files @file{subdirs.el} are normally | 69 | in their turn. The files @file{subdirs.el} are normally generated |
| 70 | generated automatically by Emacs installation. | 70 | automatically when Emacs is installed. |
| 71 | 71 | ||
| 72 | @vindex before-init-time | 72 | @vindex before-init-time |
| 73 | @item | 73 | @item |
| 74 | It records in the variable @code{before-init-time} the value of | 74 | It 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 |
| 77 | that Emacs initialization is in progress. | 77 | that 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 |
| 86 | value of @code{initial-window-system}. From that library, it calls | 86 | value of @code{initial-window-system}. From that library, it calls |
| 87 | the appropriate initialization function. The initialization function | 87 | the appropriate initialization function. The initialization function |
| 88 | is specified by @code{window-system-initialization-alist}, for each | 88 | for each supported window system is specified by |
| 89 | supported window system. | 89 | @code{window-system-initialization-alist}. |
| 90 | 90 | ||
| 91 | @item | 91 | @item |
| 92 | It sets the language environment and the terminal coding system, | 92 | 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 | on the menu bar and tool bar, if the initial frame needs them. | 104 | on the menu bar and tool bar, if the initial frame needs them. |
| 105 | 105 | ||
| 106 | @item | 106 | @item |
| 107 | It registers the default colors for text-only terminals. | 107 | It loads the library @file{site-start}, if it exists. This is not |
| 108 | 108 | done if the options @samp{-Q} or @samp{--no-site-file} were specified. | |
| 109 | @item | ||
| 110 | It 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 | ||
| 112 | name is usually @file{site-start.el}. | ||
| 113 | @cindex @file{site-start.el} | 109 | @cindex @file{site-start.el} |
| 114 | 110 | ||
| 115 | @item | 111 | @item |
| 116 | It loads your init file (usually @file{~/.emacs}), unless the option | 112 | It 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 | 113 | options @samp{-q}, @samp{-Q}, or @samp{--batch} were specified. If |
| 118 | specified on the command line. The @samp{-u} option can specify | 114 | the @samp{-u} option was specified, Emacs looks for the init file in |
| 119 | another user whose home directory should be used instead of @file{~}. | 115 | that user's home directory instead. |
| 120 | 116 | ||
| 121 | @item | 117 | @item |
| 122 | It loads the library @file{default} (if any), unless | 118 | It 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 | 119 | if @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. |
| 125 | command 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 |
| 129 | It loads your abbrevs from the file specified by | 124 | It 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 |
| 131 | that 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 |
| 132 | mode.) | 127 | option @samp{--batch} was specified. |
| 133 | 128 | ||
| 134 | @vindex after-init-time | 129 | @vindex after-init-time |
| 135 | @item | 130 | @item |
| 136 | It records in the variable @code{after-init-time} the value of | 131 | It 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; |
| 138 | beginning of the Emacs session initialization (see above), so setting | 133 | setting it to the current time signals that the initialization phase |
| 139 | it to the current time both signals that the initialization phase is | 134 | is over, and, together with @code{before-init-time}, provides the |
| 140 | over, and, together with @code{before-init-time}, provides the | ||
| 141 | measurement of how long it took. | 135 | measurement of how long it took. |
| 142 | 136 | ||
| 143 | @item | 137 | @item |
| 144 | It runs the normal hook @code{after-init-hook}. | 138 | It runs the normal hook @code{after-init-hook}. |
| 145 | 139 | ||
| 146 | @item | 140 | @item |
| 147 | It sets the major mode according to @code{initial-major-mode}, provided | 141 | If the buffer @samp{*scratch*} exists and is still in Fundamental mode |
| 148 | the buffer @samp{*scratch*} is still current and still in Fundamental | 142 | (as it should be by default), it sets its major mode according to |
| 149 | mode. | 143 | @code{initial-major-mode}. |
| 150 | 144 | ||
| 151 | @item | 145 | @item |
| 152 | It loads the terminal-specific Lisp library, if any, except when in | 146 | If started on a text-only terminal, it loads the terminal-specific |
| 153 | batch mode or when the variable @code{initial-window-system} (see | 147 | Lisp library, which is specified by the variable |
| 154 | above) specifies a non-@code{nil} window system. The name of this | 148 | @code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done |
| 155 | library is computed from the value of the variable | 149 | in @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 | |||
| 158 | If the value of @code{term-file-prefix} is @code{nil}, this step is skipped. | ||
| 159 | 150 | ||
| 160 | @item | 151 | @item |
| 161 | It displays the initial echo area message, unless you have suppressed | 152 | It displays the initial echo area message, unless you have suppressed |
| @@ -165,6 +156,14 @@ that with @code{inhibit-startup-echo-area-message}. | |||
| 165 | It processes the action arguments from the command line. | 156 | It processes the action arguments from the command line. |
| 166 | 157 | ||
| 167 | @item | 158 | @item |
| 159 | It now exits if the option @code{--batch} was specified. | ||
| 160 | |||
| 161 | @item | ||
| 162 | If @code{initial-buffer-choice} is a string, it visits the file with | ||
| 163 | that name. Furthermore, if the @samp{*scratch*} buffer exists and is | ||
| 164 | empty, it inserts @code{initial-scratch-message} into that buffer. | ||
| 165 | |||
| 166 | @item | ||
| 168 | It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. | 167 | It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. |
| 169 | 168 | ||
| 170 | @item | 169 | @item |
| @@ -176,14 +175,16 @@ specify. | |||
| 176 | It runs @code{window-setup-hook}. @xref{Window Systems}. | 175 | It runs @code{window-setup-hook}. @xref{Window Systems}. |
| 177 | 176 | ||
| 178 | @item | 177 | @item |
| 179 | It displays copyleft, nonwarranty, and basic use information, provided | 178 | If the option @code{--daemon} was specified, it calls |
| 180 | the value of @code{inhibit-startup-screen} is @code{nil}, you didn't | 179 | @code{server-start} and detaches from the controlling terminal. |
| 181 | specify @samp{--no-splash} or @samp{-Q}. | 180 | @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. |
| 182 | 181 | ||
| 183 | @item | 182 | @item |
| 184 | If the command-line arguments specified @option{--daemon}, @c FIXME: xref | 183 | It displays the @dfn{startup screen}, which is a special buffer that |
| 185 | it calls @code{server-start} (@pxref{Emacs Server,,, emacs, The GNU | 184 | contains information about copyleft and basic Emacs usage. This is |
| 186 | Emacs Manual}). | 185 | not 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 |
| 189 | If started by the X session manager, it calls | 190 | 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 | @end enumerate | 193 | @end enumerate |
| 193 | 194 | ||
| 194 | @defopt inhibit-startup-screen | 195 | @defopt inhibit-startup-screen |
| 195 | This variable inhibits the initial startup messages (the nonwarranty, | 196 | This variable, if non-@code{nil}, inhibits the startup screen. In |
| 196 | etc.). If it is non-@code{nil}, then the messages are not printed. | 197 | that case, Emacs typically displays the @samp{*scratch*} buffer; but |
| 198 | see @code{initial-buffer-choice}, below. | ||
| 197 | 199 | ||
| 198 | This variable exists so you can set it in your personal init file, once | 200 | Do not set this variable in the init file of a new user, or in a way |
| 199 | you are familiar with the contents of the startup message. Do not set | 201 | that affects more than one user, as that would prevent new users from |
| 200 | this variable in the init file of a new user, or in a way that affects | 202 | receiving information about copyleft and basic Emacs usage. |
| 201 | more than one user, because that would prevent new users from receiving | ||
| 202 | the 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 |
| 205 | back-compatibility. | 205 | aliases for this variable. |
| 206 | @end defopt | ||
| 207 | |||
| 208 | @defopt initial-buffer-choice | ||
| 209 | This variable, if non-@code{nil}, determines a file or buffer for | ||
| 210 | Emacs to display after starting up, instead of the startup screen. If | ||
| 211 | its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. If | ||
| 212 | its value is a string, that specifies the name of a file for Emacs to | ||
| 213 | visit. | ||
| 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 | |||
| 219 | file; your login name must appear in the expression as a Lisp string | 227 | file; your login name must appear in the expression as a Lisp string |
| 220 | constant. Other methods of setting | 228 | constant. 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 |
| 222 | inhibit the startup message. | 230 | inhibit the startup message. This way, you can easily inhibit the |
| 231 | message for yourself if you wish, but thoughtless copying of your init | ||
| 232 | file will not inhibit the message for someone else. | ||
| 233 | @end defopt | ||
| 223 | 234 | ||
| 224 | This way, you can easily inhibit the message for yourself if you wish, | 235 | @defopt initial-scratch-message |
| 225 | but thoughtless copying of your init file will not inhibit the message | 236 | This variable, if non-@code{nil}, should be a string, which is |
| 226 | for someone else. | 237 | inserted into the @samp{*scratch*} buffer when Emacs starts up. If it |
| 238 | is @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 |
| 235 | file}, a file in your home directory. Its normal name is | 247 | file}. This is either a file named @file{.emacs} or @file{.emacs.el} |
| 236 | @file{.emacs}, but you can also call it @file{.emacs.el}. | 248 | in your home directory, or a file named @file{init.el} in a |
| 237 | Alternatively, you can use a file named @file{init.el} in a | 249 | subdirectory named @file{.emacs.d} in your home directory. Whichever |
| 238 | subdirectory @file{.emacs.d}. Whichever place you use, you can also | 250 | place you use, you can also compile the file (@pxref{Byte |
| 239 | compile the file (@pxref{Byte Compilation}); then the actual file | 251 | Compilation}); then the actual file loaded will be @file{.emacs.elc} |
| 240 | loaded will be @file{.emacs.elc} or @file{init.elc}. | 252 | or @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} |
| 243 | control whether and where to find the init file; @samp{-q} (and the | 255 | control whether and where to find the init file; @samp{-q} (and the |