Mercurial > emacs
comparison lispref/os.texi @ 25875:6a17c48b52ef
*** empty log message ***
author | Phillip Rulon <pjr@gnu.org> |
---|---|
date | Tue, 05 Oct 1999 23:26:05 +0000 |
parents | 467b88fab665 |
children | df0efa93750b |
comparison
equal
deleted
inserted
replaced
25874:906a123add31 | 25875:6a17c48b52ef |
---|---|
83 @samp{-no-site-file} was specified. The library's file name is usually | 83 @samp{-no-site-file} was specified. The library's file name is usually |
84 @file{site-start.el}. | 84 @file{site-start.el}. |
85 @cindex @file{site-start.el} | 85 @cindex @file{site-start.el} |
86 | 86 |
87 @item | 87 @item |
88 It loads the file @file{~/.emacs}, unless @samp{-q} or @samp{-batch} was | 88 It loads your init file (usually @file{~/.emacs}), unless @samp{-q} or |
89 specified on the command line. The @samp{-u} option can specify another | 89 @samp{-batch} was specified on the command line. The @samp{-u} option |
90 user whose home directory should be used instead of @file{~}. | 90 can specify another user whose home directory should be used instead of |
91 @file{~}. | |
91 | 92 |
92 @item | 93 @item |
93 It loads the library @file{default}, unless @code{inhibit-default-init} | 94 It loads the library @file{default}, unless @code{inhibit-default-init} |
94 is non-@code{nil}. (This is not done in @samp{-batch} mode or if | 95 is non-@code{nil}. (This is not done in @samp{-batch} mode or if |
95 @samp{-q} was specified on the command line.) The library's file name | 96 @samp{-q} was specified on the command line.) The library's file name |
145 @end defopt | 146 @end defopt |
146 | 147 |
147 @defopt inhibit-startup-echo-area-message | 148 @defopt inhibit-startup-echo-area-message |
148 This variable controls the display of the startup echo area message. | 149 This variable controls the display of the startup echo area message. |
149 You can suppress the startup echo area message by adding text with this | 150 You can suppress the startup echo area message by adding text with this |
150 form to your @file{.emacs} file: | 151 form to your init file: |
151 | 152 |
152 @example | 153 @example |
153 (setq inhibit-startup-echo-area-message | 154 (setq inhibit-startup-echo-area-message |
154 "@var{your-login-name}") | 155 "@var{your-login-name}") |
155 @end example | 156 @end example |
156 | 157 |
157 Emacs explicitly checks for an expression as shown above in your | 158 Emacs explicitly checks for an expression as shown above in your init |
158 @file{.emacs} file; your login name must appear in the expression as a | 159 file; your login name must appear in the expression as a Lisp string |
159 Lisp string constant. Other methods of setting | 160 constant. Other methods of setting |
160 @code{inhibit-startup-echo-area-message} to the same value do not | 161 @code{inhibit-startup-echo-area-message} to the same value do not |
161 inhibit the startup message. | 162 inhibit the startup message. |
162 | 163 |
163 This way, you can easily inhibit the message for yourself if you wish, | 164 This way, you can easily inhibit the message for yourself if you wish, |
164 but thoughtless copying of your @file{.emacs} file will not inhibit the | 165 but thoughtless copying of your init file will not inhibit the message |
165 message for someone else. | 166 for someone else. |
166 @end defopt | 167 @end defopt |
167 | 168 |
168 @node Init File | 169 @node Init File |
169 @subsection The Init File: @file{.emacs} | 170 @subsection The Init File, @file{.emacs} |
170 @cindex init file | 171 @cindex init file |
171 @cindex @file{.emacs} | 172 @cindex @file{.emacs} |
172 | 173 |
173 When you start Emacs, it normally attempts to load the file | 174 When you start Emacs, it normally attempts to load your @dfn{init |
174 @file{.emacs} from your home directory. This file is called your | 175 file}, a file in your home directory. Its normal name is @file{.emacs}, |
175 @dfn{init file}. If it exists, it must contain Lisp code. The | 176 but you can alternatively call it @file{.emacs.el}, which enables you to |
176 command-line switches @samp{-q} and @samp{-u} affect the use of the init | 177 byte-compile it (@pxref{Byte Compilation}); then the actual file loaded |
177 file; @samp{-q} says not to load an init file, and @samp{-u} says to | 178 will be @file{.emacs.elc}. |
178 load a specified user's init file instead of yours. @xref{Entering | 179 |
179 Emacs,,, emacs, The GNU Emacs Manual}. | 180 The command-line switches @samp{-q} and @samp{-u} control whether and |
181 where to find the init file; @samp{-q} says not to load an init file, | |
182 and @samp{-u @var{user}} says to load @var{user}'s init file instead of | |
183 yours. @xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If | |
184 neither option is specified, Emacs uses the @code{LOGNAME} environment | |
185 variable, or the @code{USER} (most systems) or @code{USERNAME} (MS | |
186 systems) variable, to find your home directory and thus your init file; | |
187 this way, even if you have su'd, Emacs still loads your own init file. | |
188 If those environment variables are absent, though, Emacs uses your | |
189 user-id to find your home directory. | |
180 | 190 |
181 @cindex default init file | 191 @cindex default init file |
182 A site may have a @dfn{default init file}, which is the library named | 192 A site may have a @dfn{default init file}, which is the library named |
183 @file{default.el}. Emacs finds the @file{default.el} file through the | 193 @file{default.el}. Emacs finds the @file{default.el} file through the |
184 standard search path for libraries (@pxref{How Programs Do Loading}). | 194 standard search path for libraries (@pxref{How Programs Do Loading}). |
198 user's init file. Its normal value is @code{"site-start"}. The only | 208 user's init file. Its normal value is @code{"site-start"}. The only |
199 way you can change it with real effect is to do so before dumping | 209 way you can change it with real effect is to do so before dumping |
200 Emacs. | 210 Emacs. |
201 @end defvar | 211 @end defvar |
202 | 212 |
203 If there is a great deal of code in your @file{.emacs} file, you | |
204 can make it load faster by renaming it to @file{.emacs.el} | |
205 and then byte-compiling it (@pxref{Byte Compilation}). | |
206 | |
207 @xref{Init File Examples,,, emacs, The GNU Emacs Manual}, for | 213 @xref{Init File Examples,,, emacs, The GNU Emacs Manual}, for |
208 examples of how to make various commonly desired customizations in your | 214 examples of how to make various commonly desired customizations in your |
209 @file{.emacs} file. | 215 @file{.emacs} file. |
210 | 216 |
211 @defopt inhibit-default-init | 217 @defopt inhibit-default-init |
251 name. Thus, terminal types @samp{aaa-48} and @samp{aaa-30-rv} both use | 257 name. Thus, terminal types @samp{aaa-48} and @samp{aaa-30-rv} both use |
252 the @file{term/aaa} library. If necessary, the library can evaluate | 258 the @file{term/aaa} library. If necessary, the library can evaluate |
253 @code{(getenv "TERM")} to find the full name of the terminal | 259 @code{(getenv "TERM")} to find the full name of the terminal |
254 type.@refill | 260 type.@refill |
255 | 261 |
256 Your @file{.emacs} file can prevent the loading of the | 262 Your init file can prevent the loading of the |
257 terminal-specific library by setting the variable | 263 terminal-specific library by setting the variable |
258 @code{term-file-prefix} to @code{nil}. This feature is useful when | 264 @code{term-file-prefix} to @code{nil}. This feature is useful when |
259 experimenting with your own peculiar customizations. | 265 experimenting with your own peculiar customizations. |
260 | 266 |
261 You can also arrange to override some of the actions of the | 267 You can also arrange to override some of the actions of the |
262 terminal-specific library by setting the variable | 268 terminal-specific library by setting the variable |
263 @code{term-setup-hook}. This is a normal hook which Emacs runs using | 269 @code{term-setup-hook}. This is a normal hook which Emacs runs using |
264 @code{run-hooks} at the end of Emacs initialization, after loading both | 270 @code{run-hooks} at the end of Emacs initialization, after loading both |
265 your @file{.emacs} file and any terminal-specific libraries. You can | 271 your init file and any terminal-specific libraries. You can |
266 use this variable to define initializations for terminals that do not | 272 use this variable to define initializations for terminals that do not |
267 have their own libraries. @xref{Hooks}. | 273 have their own libraries. @xref{Hooks}. |
268 | 274 |
269 @defvar term-file-prefix | 275 @defvar term-file-prefix |
270 @cindex @code{TERM} environment variable | 276 @cindex @code{TERM} environment variable |
275 (load (concat term-file-prefix (getenv "TERM"))) | 281 (load (concat term-file-prefix (getenv "TERM"))) |
276 @end example | 282 @end example |
277 | 283 |
278 @noindent | 284 @noindent |
279 You may set the @code{term-file-prefix} variable to @code{nil} in your | 285 You may set the @code{term-file-prefix} variable to @code{nil} in your |
280 @file{.emacs} file if you do not wish to load the | 286 init file if you do not wish to load the |
281 terminal-initialization file. To do this, put the following in | 287 terminal-initialization file. To do this, put the following in |
282 your @file{.emacs} file: @code{(setq term-file-prefix nil)}. | 288 your init file: @code{(setq term-file-prefix nil)}. |
283 | 289 |
284 On MS-DOS, if the environment variable @code{TERM} is not set, Emacs | 290 On MS-DOS, if the environment variable @code{TERM} is not set, Emacs |
285 uses @samp{internal} as the terminal type. | 291 uses @samp{internal} as the terminal type. |
286 @end defvar | 292 @end defvar |
287 | 293 |
288 @defvar term-setup-hook | 294 @defvar term-setup-hook |
289 This variable is a normal hook that Emacs runs after loading your | 295 This variable is a normal hook that Emacs runs after loading your |
290 @file{.emacs} file, the default initialization file (if any) and the | 296 init file, the default initialization file (if any) and the |
291 terminal-specific Lisp file. | 297 terminal-specific Lisp file. |
292 | 298 |
293 You can use @code{term-setup-hook} to override the definitions made by a | 299 You can use @code{term-setup-hook} to override the definitions made by a |
294 terminal-specific file. | 300 terminal-specific file. |
295 @end defvar | 301 @end defvar |
325 kill the Emacs until you are about to log out.) | 331 kill the Emacs until you are about to log out.) |
326 @end ignore | 332 @end ignore |
327 | 333 |
328 @defun command-line | 334 @defun command-line |
329 This function parses the command line that Emacs was called with, | 335 This function parses the command line that Emacs was called with, |
330 processes it, loads the user's @file{.emacs} file and displays the | 336 processes it, loads the user's init file and displays the |
331 startup messages. | 337 startup messages. |
332 @end defun | 338 @end defun |
333 | 339 |
334 @defvar command-line-processed | 340 @defvar command-line-processed |
335 The value of this variable is @code{t} once the command line has been | 341 The value of this variable is @code{t} once the command line has been |
809 | 815 |
810 @defvar user-mail-address | 816 @defvar user-mail-address |
811 This holds the nominal email address of the user who is using Emacs. | 817 This holds the nominal email address of the user who is using Emacs. |
812 Emacs normally sets this variable to a default value after reading your | 818 Emacs normally sets this variable to a default value after reading your |
813 init files, but not if you have already set it. So you can set the | 819 init files, but not if you have already set it. So you can set the |
814 variable to some other value in your @file{~/.emacs} file if you do not | 820 variable to some other value in your init file if you do not |
815 want to use the default value. | 821 want to use the default value. |
816 @end defvar | 822 @end defvar |
817 | 823 |
818 @defun user-login-name &optional uid | 824 @defun user-login-name &optional uid |
819 If you don't specify @var{uid}, this function returns the name under | 825 If you don't specify @var{uid}, this function returns the name under |
1786 control, and provides the characters @kbd{C-\} and @kbd{C-^} as aliases | 1792 control, and provides the characters @kbd{C-\} and @kbd{C-^} as aliases |
1787 for them using @code{keyboard-translate-table} (@pxref{Translating Input}). | 1793 for them using @code{keyboard-translate-table} (@pxref{Translating Input}). |
1788 @end deffn | 1794 @end deffn |
1789 | 1795 |
1790 You can use the function @code{enable-flow-control-on} in your | 1796 You can use the function @code{enable-flow-control-on} in your |
1791 @file{.emacs} file to enable flow control automatically on certain | 1797 init file to enable flow control automatically on certain |
1792 terminal types. | 1798 terminal types. |
1793 | 1799 |
1794 @defun enable-flow-control-on &rest termtypes | 1800 @defun enable-flow-control-on &rest termtypes |
1795 This function enables flow control, and the aliases @kbd{C-\} and @kbd{C-^}, | 1801 This function enables flow control, and the aliases @kbd{C-\} and @kbd{C-^}, |
1796 if the terminal type is one of @var{termtypes}. For example: | 1802 if the terminal type is one of @var{termtypes}. For example: |