From e3bd99f50f6a60860c8bb3cf8b3ace09ba93da95 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 4 Jun 1992 19:58:44 +0000 Subject: [PATCH] *** empty log message *** --- lisp/frame.el | 2 +- 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.") ;;; 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 --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 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 @@ directory name of the directory where the `.emacs' file was looked for.") ;; 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 @@ directory name of the directory where the `.emacs' file was looked for.") (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