changeset 688:23cbc2c463eb

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Thu, 04 Jun 1992 19:58:44 +0000
parents e2b747dd6a6e
children 45401d45581d
files lisp/frame.el lisp/startup.el
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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