diff options
| -rw-r--r-- | lisp/frame.el | 2 | ||||
| -rw-r--r-- | lisp/startup.el | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index 54c7c8f380a..71ed659fdf7 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -62,7 +62,7 @@ These supercede the values given in default-screen-alist.") | |||
| 62 | ;;; 3) Once the init file is done, we apply any newly set parameters | 62 | ;;; 3) Once the init file is done, we apply any newly set parameters |
| 63 | ;;; in initial-screen-alist to the screen. | 63 | ;;; in initial-screen-alist to the screen. |
| 64 | 64 | ||
| 65 | (add-hook 'pre-init-hook 'screen-initialize) | 65 | (add-hook 'before-init-hook 'screen-initialize) |
| 66 | (add-hook 'window-setup-hook 'screen-notice-user-settings) | 66 | (add-hook 'window-setup-hook 'screen-notice-user-settings) |
| 67 | 67 | ||
| 68 | ;;; If we create the initial screen, this is it. | 68 | ;;; If we create the initial screen, this is it. |
diff --git a/lisp/startup.el b/lisp/startup.el index a6aa880bae1..0afe3d934e8 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -74,14 +74,19 @@ arguments). The function should return non-nil only if it recognizes and | |||
| 74 | processes argi. If it does so, it may consume successive arguments by | 74 | processes argi. If it does so, it may consume successive arguments by |
| 75 | altering command-line-args-left to remove them.") | 75 | altering command-line-args-left to remove them.") |
| 76 | 76 | ||
| 77 | (defvar pre-init-hook nil | 77 | (defvar before-init-hook nil |
| 78 | "Functions to call after handling urgent options but before loading init file. | 78 | "Functions to call after handling urgent options but before loading init file. |
| 79 | The screen system uses this to open screens to display messages while | 79 | The screen system uses this to open screens to display messages while |
| 80 | Emacs loads the user's initialization file.") | 80 | Emacs loads the user's initialization file.") |
| 81 | 81 | ||
| 82 | (defvar after-init-hook nil | ||
| 83 | "Functions to call after loading the init file (~/.emacs). | ||
| 84 | The call is not protected by a condition-case, so you can set `debug-on-error' | ||
| 85 | in .emacs, and put all the actual code on `after-init-hook'.") | ||
| 86 | |||
| 82 | (defvar term-setup-hook nil | 87 | (defvar term-setup-hook nil |
| 83 | "Function to be called after loading terminal-specific lisp code. | 88 | "Functions to be called after loading terminal-specific lisp code. |
| 84 | It is called with no arguments. This variable exists for users to set, | 89 | See `run-hooks'. This variable exists for users to set, |
| 85 | so as to override the definitions made by the terminal-specific file. | 90 | so as to override the definitions made by the terminal-specific file. |
| 86 | Emacs never sets this variable itself.") | 91 | Emacs never sets this variable itself.") |
| 87 | 92 | ||
| @@ -201,7 +206,7 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 201 | ;; Re-attach the program name to the front of the arg list. | 206 | ;; Re-attach the program name to the front of the arg list. |
| 202 | (setcdr command-line-args args)) | 207 | (setcdr command-line-args args)) |
| 203 | 208 | ||
| 204 | (run-hooks 'pre-init-hook) | 209 | (run-hooks 'before-init-hook) |
| 205 | 210 | ||
| 206 | ;; Load that user's init file, or the default one, or none. | 211 | ;; Load that user's init file, or the default one, or none. |
| 207 | (let ((debug-on-error init-file-debug) | 212 | (let ((debug-on-error init-file-debug) |
| @@ -231,6 +236,8 @@ directory name of the directory where the `.emacs' file was looked for.") | |||
| 231 | (if (cdr error) ": ") | 236 | (if (cdr error) ": ") |
| 232 | (mapconcat 'prin1-to-string (cdr error) ", ")))))) | 237 | (mapconcat 'prin1-to-string (cdr error) ", ")))))) |
| 233 | 238 | ||
| 239 | (run-hooks 'after-init-hook) | ||
| 240 | |||
| 234 | ;; If *scratch* exists and init file didn't change its mode, initialize it. | 241 | ;; If *scratch* exists and init file didn't change its mode, initialize it. |
| 235 | (if (get-buffer "*scratch*") | 242 | (if (get-buffer "*scratch*") |
| 236 | (save-excursion | 243 | (save-excursion |