# HG changeset patch # User Jim Blandy # Date 681072636 0 # Node ID d56e16bd220a24bd8cdb1629ebef7c7619bdbe30 # Parent 7f92840f8be4f91541c8ce0dbef582846307a51f *** empty log message *** diff -r 7f92840f8be4 -r d56e16bd220a lisp/startup.el --- a/lisp/startup.el Wed Jul 31 19:54:05 1991 +0000 +++ b/lisp/startup.el Thu Aug 01 18:50:36 1991 +0000 @@ -73,6 +73,11 @@ 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 + "Functions to call after handling urgent options but before loading init file. +The window/screen system uses this to open screens to display messages while +Emacs loads the user's initialization file.") + (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, @@ -85,7 +90,10 @@ fashion analogous to the environment value TERM.") (defvar window-setup-hook nil - "Function used to initialize window system display, after command line args. + "Function called to initialize window system display. +Emacs calls this after processing the command line arguments and loading +the user's init file. + Users should not set this variable; use term-setup-hook instead.") (defconst initial-major-mode 'lisp-interaction-mode @@ -188,6 +196,9 @@ ;; Re-attach the program name to the front of the arg list. (setcdr command-line-args args)) + ;; If the window system asked to, let it set up some initial screens. + (if pre-init-hook (funcall pre-init-hook)) + ;; Load that user's init file, or the default one, or none. (let ((debug-on-error init-file-debug) ;; This function actually reads the init files. @@ -215,6 +226,7 @@ (get (car error) 'error-message) (if (cdr error) ": ") (mapconcat 'prin1-to-string (cdr error) ", ")))))) + ;; If *scratch* exists and init file didn't change its mode, initialize it. (if (get-buffer "*scratch*") (save-excursion @@ -260,7 +272,7 @@ (progn (insert (emacs-version) " -Copyright (C) 1989 Free Software Foundation, Inc.\n\n") +Copyright (C) 1991 Free Software Foundation, Inc.\n\n") ;; If keys have their default meanings, ;; use precomputed string to save lots of time. (if (and (eq (key-binding "\C-h") 'help-command)