|
|
1.1 ! root 1: This describes the sequence of Emacs start-up actions, including the meaning ! 2: of all the command-line options. It was written by Joe Wells. ! 3: ! 4: 1. These command line switches are handled, only if they appear before ! 5: all other command line arguments, and only if they appear in this ! 6: order: ! 7: ! 8: `-map'. Only under VMS. Instead of "undumping", under VMS the ! 9: contents of a dump file are mapped over a section of memory (very ! 10: quickly initializing lots of variables). You would not normally ! 11: use this options explicitly; it is given automatically by the ! 12: command file that implements the `emacs' command. ! 13: ! 14: `-t'. The next argument is treated as the name of a terminal to use ! 15: instead of whatever is connected to the stdin, stdout, and stderr ! 16: FILE pointers. ! 17: ! 18: `-display' (synonym: `-d'). The next argument is treated as the ! 19: name of an X Window System server with which to connect. This ! 20: overrides the DISPLAY environment variable. ! 21: ! 22: `-nw'. This means don't connect to an X Window server even if the ! 23: DISPLAY environment variable was set or the `-display' switch was ! 24: specified. Instead, Emacs talks to a regular dumb terminal. ! 25: ! 26: `-batch'. Run noninteractively. This disables any full screen ! 27: interaction either with a dumb terminal or with a window system. ! 28: In addition, Emacs will die after processing all command line ! 29: arguments. The variable `noninteractive' is t. ! 30: ! 31: All of Emacs's internal data structures are initialized between steps 2 ! 32: and 5. ! 33: ! 34: 2. The `*scratch*' buffer is created and its value of `default-directory' ! 35: is set from the result of calling the `getwd' library routine. ! 36: (getwd does what the `pwd' program does.) ! 37: ! 38: 3. If X11 is being used, Emacs determines the name under which it looks ! 39: for X resource values. (I haven't checked how it does this under ! 40: X10.) ! 41: ! 42: 1. If there is a `-rn' command line switch, it is handled now, no ! 43: matter where it is on the command line. (Later it will be ! 44: processed again and ignored.) The next argument is used as ! 45: Emacs's resource name. ! 46: ! 47: 2. If the `-rn' switch was missing, Emacs looks for the WM_RES_NAME ! 48: environment variable. ! 49: ! 50: 3. If neither of the previous two steps succeed, Emacs uses the ! 51: filename with which it was invoked as its resource name. ! 52: ! 53: 4. If X11 is being used, these command line switches are handled now, ! 54: no matter where they appear in the command line. (Under X10, they ! 55: are not handled until step 13.) WARNING: this can cause strange ! 56: interactions with the processing of the remaining command line ! 57: arguments in step 13. ! 58: ! 59: In addition, under both X11 and X10, X resources (ie. the stuff in ! 60: an `.Xdefaults' file) are handled now. Command line switches take ! 61: precedence over resources. ! 62: ! 63: After each command line switch are given the equivalent resource ! 64: names in this format: (X10 name / X11 instance name / X11 class name). ! 65: ! 66: `-r'. Reverse video. (ReverseVideo/reverseVideo/ReverseVideo) ! 67: `-font' (synonym: `-fn'). Font. (BodyFont/font/Font) ! 68: `-wn'. Window name (X11 only). (/title/Title) ! 69: `-in'. Icon name (X11 only). (/iconName/Title) ! 70: `-i'. Use built-in icon bitmap. (BitMapIcon//) ! 71: ! 72: `-b'. Border width (in pixels). ! 73: (BorderWidth/borderWidth/BorderWidth) ! 74: ! 75: `-ib'. Internal border width (in pixels) (default: 1). ! 76: (/internalBorder/BorderWidth) ! 77: ! 78: `-xrm RESOURCESTRING'. Specifies a resource name and value ! 79: that overrides any other value in the X server for that name. ! 80: This is useful also for setting parameters that don't have their ! 81: own specific options. ! 82: ! 83: `-geometry' (synonym: `-w'). Window shape and size. `-geometry' is ! 84: X11 only, but its synonym `-w' was available under X10. ! 85: (/geometry/Geometry) ! 86: ! 87: Color options only: ! 88: ! 89: `-fg'. Foreground color. (Foreground/foreground/Foreground) ! 90: `-bg'. Background color. (Background/background/Background) ! 91: `-bd'. Border color. (Border/borderColor/BorderColor) ! 92: `-cr'. Cursor color. (Cursor/cursorColor/Foreground) ! 93: `-ms'. Mouse pointer color. (Mouse/pointerColor/Foreground) ! 94: ! 95: In addition, under X10, the resource `Keymap' was handled now. ! 96: ! 97: 5. If your Emacs isn't dumped, the default Lisp libraries are ! 98: loaded now. ! 99: ! 100: 6. Emacs enters a recursive edit. The first time Emacs does a ! 101: recursive edit, steps 7 through 15 are followed, and then Emacs ! 102: enters its normal editing mode. ! 103: ! 104: 7. If the environment variable PWD exists, the value of ! 105: `default-directory' in the `*scratch*' buffer is set to the value of ! 106: PWD. This often causes problems and confusion when the value of PWD ! 107: doesn't actually contain the pathname of the current directory. ! 108: ! 109: 8. Now the `-no-init-file' (synonym: `-q') and `-user' (synonym: `-u') ! 110: command line switches are handled. They must follow the switches ! 111: mentioned in step 1, and must precede any other command line ! 112: arguments. Actually, both of these options can be specified; ! 113: whichever is last on the command line wins. ! 114: ! 115: 9. The user's `.emacs' file is loaded now, if the `-no-init-file' ! 116: option was not specified. If the `-user' option was specified, ! 117: that user's init file is loaded instead. This file is named ! 118: `.emacs' in the user's home directory. If no such file exists, ! 119: this step has no effect. ! 120: ! 121: 10. The system wide `default.el' file is loaded now, if the variable ! 122: `inhibit-default-init' is nil. The user can set this variable in the ! 123: `.emacs' file to skip this step. ! 124: ! 125: 11. If the *scratch* buffer still exists now, the value of ! 126: `initial-major-mode' is called as a function in this buffer. ! 127: Normally, this puts this buffer in Lisp Interaction mode. ! 128: ! 129: 12. Now the terminal/window-system setup file is loaded. The name of ! 130: this file is determined as follows: ! 131: ! 132: 1. It starts with the value of `term-file-prefix'. Normally this is ! 133: `term/', but the user can set it to another value. If this ! 134: variable is nil, this entire step is skipped. ! 135: ! 136: 2. For a window system, the prefix is followed by the name of the ! 137: value of the variable `window-system', followed by `-win'. For X ! 138: Windows, this means the name is `term/x-win'. ! 139: ! 140: 3. For a terminal, the prefix is followed by the value of the ! 141: environment variable TERM, for example, `term/vt200'. If Emacs ! 142: cannot find such a file to load, it retries by stripping off ! 143: suffixes that begin with a hyphen. For example, if TERM is ! 144: `vt200-40', first Emacs will try `term/vt200-40', and if that ! 145: fails it will try `term/vt200'. ! 146: ! 147: 13. The rest of the command line arguments are handled at this point, in ! 148: the order they appear: ! 149: ! 150: `-funcall' (synonyms: `-f', `-e'). The next argument is treated as ! 151: the name of a function, which is called with no arguments. ! 152: ! 153: `-load' (synonym: `-l'). The next argument is treated as the name ! 154: of a file to load. NOTE: the value of the variable `load-path' ! 155: will be restored after this file is done loading. Thus, trying ! 156: to change `load-path' in such a file will fail!! ! 157: ! 158: `-kill'. When this argument is handled, Emacs kills itself. ! 159: ! 160: `+DDD', where D is a digit. DDD is used as a line number to go to. ! 161: When the next ordinary file argument on the command line is ! 162: handled, Emacs positions point in that file on line DDD. ! 163: ! 164: An ordinary filename. Emacs edits this file using the function ! 165: `find-file'. If the filename is not an absolute filename, it is ! 166: expanded relative to the value that default-directory in the ! 167: `*scratch*' buffer had at the beginning of step 11. The buffer ! 168: visiting this file becomes the current buffer. ! 169: ! 170: `-insert' (synonym: `-i'). The next argument is treated as the name ! 171: of a file. This file is inserted in the current buffer. ! 172: Initially, this is the `*scratch*' buffer. Otherwise it is the ! 173: buffer visiting the file most recently specified on the command ! 174: line. ! 175: ! 176: Other command line switches may have been created by modifying the ! 177: value of the variable `command-switch-alist'. If X Windows is being ! 178: used, all X-specific switches mentioned above in steps 3 and 4 will ! 179: be processed. Under X11, they will have already been handled, and ! 180: will be ignored now. Under X10, they are being handled for the ! 181: first time. ! 182: ! 183: 14. The values of the variables `term-setup-hook' and `window-setup-hook' ! 184: are called as functions with no arguments, in the order listed. ! 185: ! 186: 15. If the user did not specify any of the command line options handled ! 187: in step 13, and the variable `inhibit-startup-message' is still nil, ! 188: the familiar Emacs startup message is displayed. ! 189: ! 190:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.