changeset 92314:4cc33029958f

Always add initial message to *scratch* buffer if `initial-scratch-message' is non-nil regardless of the value of `inhibit-startup-screen'. (inhibit-startup-screen, initial-scratch-message): Doc fix. (command-line-1): Move code that inserts `initial-scratch-message' up before the if-form that checks for `inhibit-startup-screen'. Suggested by Jonathan Rockway <jon@jrock.us>.
author Juri Linkov <juri@jurta.org>
date Thu, 28 Feb 2008 22:50:12 +0000
parents be4e2a3fa5b6
children 3fe6adc69c98
files lisp/startup.el
diffstat 1 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Thu Feb 28 21:02:45 2008 +0000
+++ b/lisp/startup.el	Thu Feb 28 22:50:12 2008 +0000
@@ -56,7 +56,6 @@
 
 (defcustom inhibit-startup-screen nil
   "Non-nil inhibits the startup screen.
-It also inhibits display of the initial message in the `*scratch*' buffer.
 
 This is for use in your personal init file (but NOT site-start.el), once
 you are familiar with the contents of the startup screen."
@@ -1155,9 +1154,7 @@
 
 ")
   "Initial message displayed in *scratch* buffer at startup.
-If this is nil, no message will be displayed.
-If `inhibit-startup-screen' is non-nil, then no message is displayed,
-regardless of the value of this variable."
+If this is nil, no message will be displayed."
   :type '(choice (text :tag "Message")
 		 (const :tag "none" nil))
   :group 'initialization)
@@ -2185,6 +2182,14 @@
 	    ((stringp initial-buffer-choice)
 	     (find-file initial-buffer-choice))))
 
+    ;; If *scratch* exists and is empty, insert initial-scratch-message.
+    (and initial-scratch-message
+	 (get-buffer "*scratch*")
+	 (with-current-buffer "*scratch*"
+	   (when (zerop (buffer-size))
+	     (insert initial-scratch-message)
+	     (set-buffer-modified-p nil))))
+
     (if (or inhibit-startup-screen
 	    initial-buffer-choice
 	    noninteractive
@@ -2230,14 +2235,6 @@
       ;; (with-no-warnings
       ;; 	(setq menubar-bindings-done t))
 
-      ;; If *scratch* exists and is empty, insert initial-scratch-message.
-      (and initial-scratch-message
-	   (get-buffer "*scratch*")
-	   (with-current-buffer "*scratch*"
-	     (when (zerop (buffer-size))
-	       (insert initial-scratch-message)
-	       (set-buffer-modified-p nil))))
-
       (if (> file-count 0)
 	  (display-startup-screen t)
 	(display-startup-screen nil)))))