aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2008-02-28 22:50:26 +0000
committerJuri Linkov2008-02-28 22:50:26 +0000
commit8d86c6da46f3c7fa1d126fd02b21233049b8ff4a (patch)
treedde8a9c58abe67fa5d0ed8b71fd1454aebccd769
parent5c842d76fa043f799b73ed3050abb9a836639e86 (diff)
downloademacs-8d86c6da46f3c7fa1d126fd02b21233049b8ff4a.tar.gz
emacs-8d86c6da46f3c7fa1d126fd02b21233049b8ff4a.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 6ea84c84d1a..d3e3ccc66ae 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
12008-02-28 Juri Linkov <juri@jurta.org> 12008-02-28 Juri Linkov <juri@jurta.org>
2 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
112008-02-28 Juri Linkov <juri@jurta.org>
12
3 * cus-edit.el (custom-mode-map, custom-mode-link-map): 13 * cus-edit.el (custom-mode-map, custom-mode-link-map):
4 Rename `custom-mode' to `Custom-mode' in docstrings. 14 Rename `custom-mode' to `Custom-mode' in docstrings.
5 (custom-buffer-create-internal, customize-browse): 15 (custom-buffer-create-internal, customize-browse):
diff --git a/lisp/startup.el b/lisp/startup.el
index 27589295c44..5238a1e5936 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -56,7 +56,6 @@ directory using `find-file'. If t, open the `*scratch*' buffer."
56 56
57(defcustom inhibit-startup-screen nil 57(defcustom inhibit-startup-screen nil
58 "Non-nil inhibits the startup screen. 58 "Non-nil inhibits the startup screen.
59It also inhibits display of the initial message in the `*scratch*' buffer.
60 59
61This is for use in your personal init file (but NOT site-start.el), once 60This is for use in your personal init file (but NOT site-start.el), once
62you are familiar with the contents of the startup screen." 61you are familiar with the contents of the startup screen."
@@ -1155,9 +1154,7 @@ opening the first frame (e.g. open a connection to an X server).")
1155 1154
1156") 1155")
1157 "Initial message displayed in *scratch* buffer at startup. 1156 "Initial message displayed in *scratch* buffer at startup.
1158If this is nil, no message will be displayed. 1157If this is nil, no message will be displayed."
1159If `inhibit-startup-screen' is non-nil, then no message is displayed,
1160regardless of the value of this variable."
1161 :type '(choice (text :tag "Message") 1158 :type '(choice (text :tag "Message")
1162 (const :tag "none" nil)) 1159 (const :tag "none" nil))
1163 :group 'initialization) 1160 :group 'initialization)
@@ -2185,6 +2182,14 @@ A fancy display is used on graphic displays, normal otherwise."
2185 ((stringp initial-buffer-choice) 2182 ((stringp initial-buffer-choice)
2186 (find-file initial-buffer-choice)))) 2183 (find-file initial-buffer-choice))))
2187 2184
2185 ;; If *scratch* exists and is empty, insert initial-scratch-message.
2186 (and initial-scratch-message
2187 (get-buffer "*scratch*")
2188 (with-current-buffer "*scratch*"
2189 (when (zerop (buffer-size))
2190 (insert initial-scratch-message)
2191 (set-buffer-modified-p nil))))
2192
2188 (if (or inhibit-startup-screen 2193 (if (or inhibit-startup-screen
2189 initial-buffer-choice 2194 initial-buffer-choice
2190 noninteractive 2195 noninteractive
@@ -2230,14 +2235,6 @@ A fancy display is used on graphic displays, normal otherwise."
2230 ;; (with-no-warnings 2235 ;; (with-no-warnings
2231 ;; (setq menubar-bindings-done t)) 2236 ;; (setq menubar-bindings-done t))
2232 2237
2233 ;; If *scratch* exists and is empty, insert initial-scratch-message.
2234 (and initial-scratch-message
2235 (get-buffer "*scratch*")
2236 (with-current-buffer "*scratch*"
2237 (when (zerop (buffer-size))
2238 (insert initial-scratch-message)
2239 (set-buffer-modified-p nil))))
2240
2241 (if (> file-count 0) 2238 (if (> file-count 0)
2242 (display-startup-screen t) 2239 (display-startup-screen t)
2243 (display-startup-screen nil))))) 2240 (display-startup-screen nil)))))