diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-09-09 19:21:31 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-09-09 19:21:31 +0000 |
commit | 46d6e6920075af484a606821ab5d5cc2404e19bb (patch) | |
tree | 8a765ace655a003cd2f970f06ff2c669c54923ca /lisp/startup.el | |
parent | 755b22098435a5843a862477d9b5eb5f81c9d699 (diff) | |
download | emacs-46d6e6920075af484a606821ab5d5cc2404e19bb.tar.gz |
(normal-splash-screen): Don't display the buffer if we'll
kill it right away anyway.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 2ef216892b4..bc51b4ee037 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1386,7 +1386,7 @@ mouse." minor-mode-map-alist old-minor-mode-map-alist emulation-mode-map-alists old-emulation-mode-map-alists) (kill-buffer splash-buffer))))) - ;; If hide-on-input is non-nil, don't hide the buffer on input. + ;; If hide-on-input is nil, don't hide the buffer on input. (if (or (window-minibuffer-p) (window-dedicated-p (selected-window))) (pop-to-buffer (current-buffer)) @@ -1586,17 +1586,20 @@ Type \\[describe-distribution] for information on getting the latest version.")) (if (and view-read-only (not view-mode)) (view-mode-enter nil 'kill-buffer)) (goto-char (point-min)) - (if (or (window-minibuffer-p) - (window-dedicated-p (selected-window))) - ;; If hide-on-input is nil, creating a new frame will - ;; generate enough events that the subsequent `sit-for' - ;; will immediately return anyway. - (pop-to-buffer (current-buffer)) - (if hide-on-input + (if hide-on-input + (if (or (window-minibuffer-p) + (window-dedicated-p (selected-window))) + ;; If hide-on-input is nil, creating a new frame will + ;; generate enough events that the subsequent `sit-for' + ;; will immediately return anyway. + nil ;; (pop-to-buffer (current-buffer)) (save-window-excursion - (switch-to-buffer (current-buffer)) - (sit-for 120)) - (switch-to-buffer (current-buffer))))) + (switch-to-buffer (current-buffer)) + (sit-for 120))) + (condition-case nil + (switch-to-buffer (current-buffer)) + ;; In case the window is dedicated or something. + (error (pop-to-buffer (current-buffer)))))) ;; Unwind ... ensure splash buffer is killed (if hide-on-input (kill-buffer "GNU Emacs"))))) |