changeset 80242:ed1da887c510

(normal-splash-screen): Add argument `concise'. Remove unused binding `prev-buffer'. Let-bind `splash-buffer' to the created buffer. If `concise' is non-nil, call `display-buffer', otherwise `switch-to-buffer'. Doc fix. (display-startup-screen): Add argument `concise' to the call to `normal-splash-screen'.
author Juri Linkov <juri@jurta.org>
date Thu, 28 Feb 2008 23:29:44 +0000
parents 158cdf102893
children 1cdfe9ca8618
files lisp/startup.el
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Thu Feb 28 22:56:02 2008 +0000
+++ b/lisp/startup.el	Thu Feb 28 23:29:44 2008 +0000
@@ -1544,12 +1544,14 @@
 	  (> frame-height (+ image-height 19)))))))
 
 
-(defun normal-splash-screen (&optional startup)
+(defun normal-splash-screen (&optional startup concise)
   "Display non-graphic splash screen.
 If optional argument STARTUP is non-nil, display the startup screen
-after Emacs starts.  If STARTUP is nil, display the About screen."
-  (let ((prev-buffer (current-buffer)))
-    (with-current-buffer (get-buffer-create "*About GNU Emacs*")
+after Emacs starts.  If STARTUP is nil, display the About screen.
+If CONCISE is non-nil, display a concise version of the
+splash screen in another window."
+  (let ((splash-buffer (get-buffer-create "*About GNU Emacs*")))
+    (with-current-buffer splash-buffer
       (setq buffer-read-only nil)
       (erase-buffer)
       (setq default-directory command-line-default-directory)
@@ -1610,9 +1612,11 @@
       (setq buffer-read-only t)
       (if (and view-read-only (not view-mode))
 	  (view-mode-enter nil 'kill-buffer))
-      (switch-to-buffer "*About GNU Emacs*")
       (if startup (rename-buffer "*GNU Emacs*" t))
-      (goto-char (point-min)))))
+      (goto-char (point-min)))
+    (if concise
+	(display-buffer splash-buffer)
+      (switch-to-buffer splash-buffer))))
 
 (defun normal-mouse-startup-screen ()
   ;; The user can use the mouse to activate menus
@@ -1884,7 +1888,7 @@
   (if (not (get-buffer "*GNU Emacs*"))
       (if (use-fancy-splash-screens-p)
       	  (fancy-startup-screen concise)
-      	(normal-splash-screen t))))
+      	(normal-splash-screen t concise))))
 
 (defun display-about-screen ()
   "Display the *About GNU Emacs* buffer.