summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2008-02-28 22:43:30 +0000
committerJuri Linkov <juri@jurta.org>2008-02-28 22:43:30 +0000
commit22351e44a3afb189c438fb02f73b8e5065afd0e1 (patch)
treecb60300ab68b90faab54f246ab12bcfee846d026
parentdacce8310406e94994e6c7d8b63e73784134b431 (diff)
downloademacs-22351e44a3afb189c438fb02f73b8e5065afd0e1.tar.gz
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 @@
+2008-02-28 Juri Linkov <juri@jurta.org>
+
+ * startup.el: 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>.
+
2008-02-28 Stefan Monnier <monnier@iro.umontreal.ca>
* 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 @@
(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."
@@ -1123,9 +1122,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
")
"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)
@@ -2120,6 +2117,14 @@ A fancy display is used on graphic displays, normal otherwise."
;; abort later.
(unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
+ ;; 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
noninteractive
emacs-quick-startup)
@@ -2164,14 +2169,6 @@ A fancy display is used on graphic displays, normal otherwise."
;; (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)))))