From: Juri Linkov Date: Thu, 28 Feb 2008 22:50:26 +0000 (+0000) Subject: Always add initial message to *scratch* buffer if X-Git-Tag: emacs-pretest-23.0.90~7586 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8d86c6da46f3c7fa1d126fd02b21233049b8ff4a;p=emacs.git 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 . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ea84c84d1a..d3e3ccc66ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2008-02-28 Juri Linkov + + * 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 . + 2008-02-28 Juri Linkov * cus-edit.el (custom-mode-map, custom-mode-link-map): 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." (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 @@ opening the first frame (e.g. open a connection to an X server).") ") "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 @@ A fancy display is used on graphic displays, normal otherwise." ((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 @@ 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)))))