diff options
| author | Jim Blandy | 1991-08-01 18:50:36 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-08-01 18:50:36 +0000 |
| commit | 3fc958a457c155b5975af0d940795fdb7b32e55a (patch) | |
| tree | a76ebc56824fc23189f5628677db786a25eb7761 | |
| parent | 6d4238f39ba8e37b12f5738df75b2d6201a10ad2 (diff) | |
| download | emacs-3fc958a457c155b5975af0d940795fdb7b32e55a.tar.gz emacs-3fc958a457c155b5975af0d940795fdb7b32e55a.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/startup.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 4be8088fb47..7775a9a2178 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -73,6 +73,11 @@ arguments). The function should return non-nil only if it recognizes and | |||
| 73 | processes argi. If it does so, it may consume successive arguments by | 73 | processes argi. If it does so, it may consume successive arguments by |
| 74 | altering command-line-args-left to remove them.") | 74 | altering command-line-args-left to remove them.") |
| 75 | 75 | ||
| 76 | (defvar pre-init-hook nil | ||
| 77 | "Functions to call after handling urgent options but before loading init file. | ||
| 78 | The window/screen system uses this to open screens to display messages while | ||
| 79 | Emacs loads the user's initialization file.") | ||
| 80 | |||
| 76 | (defvar term-setup-hook nil | 81 | (defvar term-setup-hook nil |
| 77 | "Function to be called after loading terminal-specific lisp code. | 82 | "Function to be called after loading terminal-specific lisp code. |
| 78 | It is called with no arguments. This variable exists for users to set, | 83 | It is called with no arguments. This variable exists for users to set, |
| @@ -85,7 +90,10 @@ the proper function and keypad keys for use under X. It is used in a | |||
| 85 | fashion analogous to the environment value TERM.") | 90 | fashion analogous to the environment value TERM.") |
| 86 | 91 | ||
| 87 | (defvar window-setup-hook nil | 92 | (defvar window-setup-hook nil |
| 88 | "Function used to initialize window system display, after command line args. | 93 | "Function called to initialize window system display. |
| 94 | Emacs calls this after processing the command line arguments and loading | ||
| 95 | the user's init file. | ||
| 96 | |||
| 89 | Users should not set this variable; use term-setup-hook instead.") | 97 | Users should not set this variable; use term-setup-hook instead.") |
| 90 | 98 | ||
| 91 | (defconst initial-major-mode 'lisp-interaction-mode | 99 | (defconst initial-major-mode 'lisp-interaction-mode |
| @@ -188,6 +196,9 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 188 | ;; Re-attach the program name to the front of the arg list. | 196 | ;; Re-attach the program name to the front of the arg list. |
| 189 | (setcdr command-line-args args)) | 197 | (setcdr command-line-args args)) |
| 190 | 198 | ||
| 199 | ;; If the window system asked to, let it set up some initial screens. | ||
| 200 | (if pre-init-hook (funcall pre-init-hook)) | ||
| 201 | |||
| 191 | ;; Load that user's init file, or the default one, or none. | 202 | ;; Load that user's init file, or the default one, or none. |
| 192 | (let ((debug-on-error init-file-debug) | 203 | (let ((debug-on-error init-file-debug) |
| 193 | ;; This function actually reads the init files. | 204 | ;; This function actually reads the init files. |
| @@ -215,6 +226,7 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 215 | (get (car error) 'error-message) | 226 | (get (car error) 'error-message) |
| 216 | (if (cdr error) ": ") | 227 | (if (cdr error) ": ") |
| 217 | (mapconcat 'prin1-to-string (cdr error) ", ")))))) | 228 | (mapconcat 'prin1-to-string (cdr error) ", ")))))) |
| 229 | |||
| 218 | ;; If *scratch* exists and init file didn't change its mode, initialize it. | 230 | ;; If *scratch* exists and init file didn't change its mode, initialize it. |
| 219 | (if (get-buffer "*scratch*") | 231 | (if (get-buffer "*scratch*") |
| 220 | (save-excursion | 232 | (save-excursion |
| @@ -260,7 +272,7 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 260 | (progn | 272 | (progn |
| 261 | (insert (emacs-version) | 273 | (insert (emacs-version) |
| 262 | " | 274 | " |
| 263 | Copyright (C) 1989 Free Software Foundation, Inc.\n\n") | 275 | Copyright (C) 1991 Free Software Foundation, Inc.\n\n") |
| 264 | ;; If keys have their default meanings, | 276 | ;; If keys have their default meanings, |
| 265 | ;; use precomputed string to save lots of time. | 277 | ;; use precomputed string to save lots of time. |
| 266 | (if (and (eq (key-binding "\C-h") 'help-command) | 278 | (if (and (eq (key-binding "\C-h") 'help-command) |