aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2008-02-28 22:43:30 +0000
committerJuri Linkov2008-02-28 22:43:30 +0000
commit22351e44a3afb189c438fb02f73b8e5065afd0e1 (patch)
treecb60300ab68b90faab54f246ab12bcfee846d026
parentdacce8310406e94994e6c7d8b63e73784134b431 (diff)
downloademacs-22351e44a3afb189c438fb02f73b8e5065afd0e1.tar.gz
emacs-22351e44a3afb189c438fb02f73b8e5065afd0e1.zip
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>.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/startup.el21
2 files changed, 19 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 528f817a01f..4b99bd30c06 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12008-02-28 Juri Linkov <juri@jurta.org>
2
3 * startup.el: Always add initial message to *scratch* buffer if
4 `initial-scratch-message' is non-nil regardless of the value of
5 `inhibit-startup-screen'.
6 (inhibit-startup-screen, initial-scratch-message): Doc fix.
7 (command-line-1): Move code that inserts `initial-scratch-message'
8 up before the if-form that checks for `inhibit-startup-screen'.
9 Suggested by Jonathan Rockway <jon@jrock.us>.
10
12008-02-28 Stefan Monnier <monnier@iro.umontreal.ca> 112008-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * textmodes/fill.el (fill-comment-paragraph): Don't try to do 13 * textmodes/fill.el (fill-comment-paragraph): Don't try to do
diff --git a/lisp/startup.el b/lisp/startup.el
index 1b325db45e7..059ae8de075 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -42,7 +42,6 @@
42 42
43(defcustom inhibit-startup-screen nil 43(defcustom inhibit-startup-screen nil
44 "Non-nil inhibits the startup screen. 44 "Non-nil inhibits the startup screen.
45It also inhibits display of the initial message in the `*scratch*' buffer.
46 45
47This is for use in your personal init file (but NOT site-start.el), once 46This is for use in your personal init file (but NOT site-start.el), once
48you are familiar with the contents of the startup screen." 47you are familiar with the contents of the startup screen."
@@ -1123,9 +1122,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
1123 1122
1124") 1123")
1125 "Initial message displayed in *scratch* buffer at startup. 1124 "Initial message displayed in *scratch* buffer at startup.
1126If this is nil, no message will be displayed. 1125If this is nil, no message will be displayed."
1127If `inhibit-startup-screen' is non-nil, then no message is displayed,
1128regardless of the value of this variable."
1129 :type '(choice (text :tag "Message") 1126 :type '(choice (text :tag "Message")
1130 (const :tag "none" nil)) 1127 (const :tag "none" nil))
1131 :group 'initialization) 1128 :group 'initialization)
@@ -2120,6 +2117,14 @@ A fancy display is used on graphic displays, normal otherwise."
2120 ;; abort later. 2117 ;; abort later.
2121 (unless (frame-live-p (selected-frame)) (kill-emacs nil)))))) 2118 (unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
2122 2119
2120 ;; If *scratch* exists and is empty, insert initial-scratch-message.
2121 (and initial-scratch-message
2122 (get-buffer "*scratch*")
2123 (with-current-buffer "*scratch*"
2124 (when (zerop (buffer-size))
2125 (insert initial-scratch-message)
2126 (set-buffer-modified-p nil))))
2127
2123 (if (or inhibit-startup-screen 2128 (if (or inhibit-startup-screen
2124 noninteractive 2129 noninteractive
2125 emacs-quick-startup) 2130 emacs-quick-startup)
@@ -2164,14 +2169,6 @@ A fancy display is used on graphic displays, normal otherwise."
2164 ;; (with-no-warnings 2169 ;; (with-no-warnings
2165 ;; (setq menubar-bindings-done t)) 2170 ;; (setq menubar-bindings-done t))
2166 2171
2167 ;; If *scratch* exists and is empty, insert initial-scratch-message.
2168 (and initial-scratch-message
2169 (get-buffer "*scratch*")
2170 (with-current-buffer "*scratch*"
2171 (when (zerop (buffer-size))
2172 (insert initial-scratch-message)
2173 (set-buffer-modified-p nil))))
2174
2175 (if (> file-count 0) 2172 (if (> file-count 0)
2176 (display-startup-screen t) 2173 (display-startup-screen t)
2177 (display-startup-screen nil))))) 2174 (display-startup-screen nil)))))