aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-02-23 15:16:29 +0000
committerRichard M. Stallman2003-02-23 15:16:29 +0000
commitdeebb0e98e0334b1efafa2813a85967bf1c8ac90 (patch)
tree91659c2d30bb65106827bc09ad7d0579e3670cf3
parent120d0a23ea5a2a4b9cea75ead02c73ea85ed7b1b (diff)
downloademacs-deebb0e98e0334b1efafa2813a85967bf1c8ac90.tar.gz
emacs-deebb0e98e0334b1efafa2813a85967bf1c8ac90.zip
(inhibit-startup-hooks): New variable.
(normal-top-level): Obey that variable. (command-line-1): Run emacs-startup-hook before term-setup-hook. Set inhibit-startup-hooks too.
-rw-r--r--lisp/startup.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index e0fb840c161..51ec459175c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -270,6 +270,10 @@ It also follows `emacs-startup-hook'. This hook exists for users to set,
270so as to override the definitions made by the terminal-specific file. 270so as to override the definitions made by the terminal-specific file.
271Emacs never sets this variable itself.") 271Emacs never sets this variable itself.")
272 272
273(defvar inhibit-startup-hooks nil
274 "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'.
275This is because we already did so.")
276
273(defvar keyboard-type nil 277(defvar keyboard-type nil
274 "The brand of keyboard you are using. 278 "The brand of keyboard you are using.
275This variable is used to define 279This variable is used to define
@@ -496,9 +500,10 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
496 auto-save-list-file-prefix 500 auto-save-list-file-prefix
497 (emacs-pid) 501 (emacs-pid)
498 (system-name)))))))) 502 (system-name))))))))
499 (run-hooks 'emacs-startup-hook) 503 (unless inhibit-startup-hooks
500 (and term-setup-hook 504 (run-hooks 'emacs-startup-hook)
501 (run-hooks 'term-setup-hook)) 505 (and term-setup-hook
506 (run-hooks 'term-setup-hook)))
502 507
503 ;; Don't do this if we failed to create the initial frame, 508 ;; Don't do this if we failed to create the initial frame,
504 ;; for instance due to a dense colormap. 509 ;; for instance due to a dense colormap.
@@ -1755,10 +1760,10 @@ normal otherwise."
1755 ;; If there are no switches to process, we might as well 1760 ;; If there are no switches to process, we might as well
1756 ;; run this hook now, and there may be some need to do it 1761 ;; run this hook now, and there may be some need to do it
1757 ;; before doing any output. 1762 ;; before doing any output.
1763 (run-hooks 'emacs-startup-hook)
1758 (and term-setup-hook 1764 (and term-setup-hook
1759 (run-hooks 'term-setup-hook)) 1765 (run-hooks 'term-setup-hook))
1760 ;; Don't let the hook be run twice. 1766 (setq inhibit-startup-hooks t)
1761 (setq term-setup-hook nil)
1762 1767
1763 ;; It's important to notice the user settings before we 1768 ;; It's important to notice the user settings before we
1764 ;; display the startup message; otherwise, the settings 1769 ;; display the startup message; otherwise, the settings