diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/startup.el | 25 |
2 files changed, 15 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2553fea6a4d..1054db7c118 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2014-03-27 Glenn Morris <rgm@gnu.org> | 1 | 2014-03-27 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * startup.el (inhibit-startup-hooks): Doc tweak. | ||
| 4 | (normal-top-level): Simplify running of hooks. | ||
| 5 | For window-setup-hook, respect inhibit-startup-hooks. | ||
| 6 | (command-line-1): Don't set window-setup-hook to nil. | ||
| 7 | |||
| 3 | Allow selective autoloading from obsolete/ directory. | 8 | Allow selective autoloading from obsolete/ directory. |
| 4 | * Makefile.in (obsolete-autoloads): New rule. | 9 | * Makefile.in (obsolete-autoloads): New rule. |
| 5 | (autoloads): Run obsolete-autoloads. | 10 | (autoloads): Run obsolete-autoloads. |
diff --git a/lisp/startup.el b/lisp/startup.el index a37245ae01e..ef531af12df 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -292,8 +292,9 @@ see `tty-setup-hook'.") | |||
| 292 | `tty-setup-hook' instead." "24.4") | 292 | `tty-setup-hook' instead." "24.4") |
| 293 | 293 | ||
| 294 | (defvar inhibit-startup-hooks nil | 294 | (defvar inhibit-startup-hooks nil |
| 295 | "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'. | 295 | "Non-nil means don't run some startup hooks, because we already did. |
| 296 | This is because we already did so.") | 296 | Currently this applies to: `emacs-startup-hook', `term-setup-hook', |
| 297 | and `window-setup-hook'.") | ||
| 297 | 298 | ||
| 298 | (defvar keyboard-type nil | 299 | (defvar keyboard-type nil |
| 299 | "The brand of keyboard you are using. | 300 | "The brand of keyboard you are using. |
| @@ -644,9 +645,7 @@ It is the default value of the variable `top-level'." | |||
| 644 | (emacs-pid) | 645 | (emacs-pid) |
| 645 | (system-name)))))))) | 646 | (system-name)))))))) |
| 646 | (unless inhibit-startup-hooks | 647 | (unless inhibit-startup-hooks |
| 647 | (run-hooks 'emacs-startup-hook) | 648 | (run-hooks 'emacs-startup-hook 'term-setup-hook)) |
| 648 | (and term-setup-hook | ||
| 649 | (run-hooks 'term-setup-hook))) | ||
| 650 | 649 | ||
| 651 | ;; Don't do this if we failed to create the initial frame, | 650 | ;; Don't do this if we failed to create the initial frame, |
| 652 | ;; for instance due to a dense colormap. | 651 | ;; for instance due to a dense colormap. |
| @@ -682,8 +681,8 @@ It is the default value of the variable `top-level'." | |||
| 682 | ;; Now we know the user's default font, so add it to the menu. | 681 | ;; Now we know the user's default font, so add it to the menu. |
| 683 | (if (fboundp 'font-menu-add-default) | 682 | (if (fboundp 'font-menu-add-default) |
| 684 | (font-menu-add-default)) | 683 | (font-menu-add-default)) |
| 685 | (and window-setup-hook | 684 | (unless inhibit-startup-hooks |
| 686 | (run-hooks 'window-setup-hook)))) | 685 | (run-hooks 'window-setup-hook)))) |
| 687 | ;; Subprocesses of Emacs do not have direct access to the terminal, so | 686 | ;; Subprocesses of Emacs do not have direct access to the terminal, so |
| 688 | ;; unless told otherwise they should only assume a dumb terminal. | 687 | ;; unless told otherwise they should only assume a dumb terminal. |
| 689 | ;; We are careful to do it late (after term-setup-hook), although the | 688 | ;; We are careful to do it late (after term-setup-hook), although the |
| @@ -2431,10 +2430,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2431 | ;; If there are no switches to process, we might as well | 2430 | ;; If there are no switches to process, we might as well |
| 2432 | ;; run this hook now, and there may be some need to do it | 2431 | ;; run this hook now, and there may be some need to do it |
| 2433 | ;; before doing any output. | 2432 | ;; before doing any output. |
| 2434 | (run-hooks 'emacs-startup-hook) | 2433 | (run-hooks 'emacs-startup-hook 'term-setup-hook) |
| 2435 | (and term-setup-hook | ||
| 2436 | (run-hooks 'term-setup-hook)) | ||
| 2437 | (setq inhibit-startup-hooks t) | ||
| 2438 | 2434 | ||
| 2439 | ;; It's important to notice the user settings before we | 2435 | ;; It's important to notice the user settings before we |
| 2440 | ;; display the startup message; otherwise, the settings | 2436 | ;; display the startup message; otherwise, the settings |
| @@ -2446,10 +2442,9 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2446 | ;; If there are no switches to process, we might as well | 2442 | ;; If there are no switches to process, we might as well |
| 2447 | ;; run this hook now, and there may be some need to do it | 2443 | ;; run this hook now, and there may be some need to do it |
| 2448 | ;; before doing any output. | 2444 | ;; before doing any output. |
| 2449 | (when window-setup-hook | 2445 | (run-hooks 'window-setup-hook) |
| 2450 | (run-hooks 'window-setup-hook) | 2446 | |
| 2451 | ;; Don't let the hook be run twice. | 2447 | (setq inhibit-startup-hooks t) |
| 2452 | (setq window-setup-hook nil)) | ||
| 2453 | 2448 | ||
| 2454 | ;; ;; Do this now to avoid an annoying delay if the user | 2449 | ;; ;; Do this now to avoid an annoying delay if the user |
| 2455 | ;; ;; clicks the menu bar during the sit-for. | 2450 | ;; ;; clicks the menu bar during the sit-for. |