# HG changeset patch # User Roland McGrath # Date 707687924 0 # Node ID 23cbc2c463ebcbd7967dd25faf64d13ce3eefaa9 # Parent e2b747dd6a6e303f6cc800c5817a846a5bbb2090 *** empty log message *** diff -r e2b747dd6a6e -r 23cbc2c463eb lisp/frame.el --- a/lisp/frame.el Thu Jun 04 06:43:29 1992 +0000 +++ b/lisp/frame.el Thu Jun 04 19:58:44 1992 +0000 @@ -62,7 +62,7 @@ ;;; 3) Once the init file is done, we apply any newly set parameters ;;; in initial-screen-alist to the screen. -(add-hook 'pre-init-hook 'screen-initialize) +(add-hook 'before-init-hook 'screen-initialize) (add-hook 'window-setup-hook 'screen-notice-user-settings) ;;; If we create the initial screen, this is it. diff -r e2b747dd6a6e -r 23cbc2c463eb lisp/startup.el --- a/lisp/startup.el Thu Jun 04 06:43:29 1992 +0000 +++ b/lisp/startup.el Thu Jun 04 19:58:44 1992 +0000 @@ -74,14 +74,19 @@ processes argi. If it does so, it may consume successive arguments by altering command-line-args-left to remove them.") -(defvar pre-init-hook nil +(defvar before-init-hook nil "Functions to call after handling urgent options but before loading init file. The screen system uses this to open screens to display messages while Emacs loads the user's initialization file.") +(defvar after-init-hook nil + "Functions to call after loading the init file (~/.emacs). +The call is not protected by a condition-case, so you can set `debug-on-error' +in .emacs, and put all the actual code on `after-init-hook'.") + (defvar term-setup-hook nil - "Function to be called after loading terminal-specific lisp code. -It is called with no arguments. This variable exists for users to set, + "Functions to be called after loading terminal-specific lisp code. +See `run-hooks'. This variable exists for users to set, so as to override the definitions made by the terminal-specific file. Emacs never sets this variable itself.") @@ -201,7 +206,7 @@ ;; Re-attach the program name to the front of the arg list. (setcdr command-line-args args)) - (run-hooks 'pre-init-hook) + (run-hooks 'before-init-hook) ;; Load that user's init file, or the default one, or none. (let ((debug-on-error init-file-debug) @@ -231,6 +236,8 @@ (if (cdr error) ": ") (mapconcat 'prin1-to-string (cdr error) ", ")))))) + (run-hooks 'after-init-hook) + ;; If *scratch* exists and init file didn't change its mode, initialize it. (if (get-buffer "*scratch*") (save-excursion