Mercurial > emacs
comparison lisp/startup.el @ 80263:5a10ddb5551f
Revert 2008-02-28 change that adds initial message
to *scratch* buffer regardless of the value of `inhibit-startup-screen'.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 02 Mar 2008 16:17:57 +0000 |
parents | ed1da887c510 |
children | 918dceaeacfc |
comparison
equal
deleted
inserted
replaced
80262:22717831546c | 80263:5a10ddb5551f |
---|---|
40 "Emacs start-up procedure." | 40 "Emacs start-up procedure." |
41 :group 'environment) | 41 :group 'environment) |
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. |
45 It also inhibits display of the initial message in the `*scratch*' buffer. | |
45 | 46 |
46 This is for use in your personal init file (but NOT site-start.el), once | 47 This is for use in your personal init file (but NOT site-start.el), once |
47 you are familiar with the contents of the startup screen." | 48 you are familiar with the contents of the startup screen." |
48 :type 'boolean | 49 :type 'boolean |
49 :group 'initialization) | 50 :group 'initialization) |
1120 ;; If you want to create a file, visit that file with C-x C-f, | 1121 ;; If you want to create a file, visit that file with C-x C-f, |
1121 ;; then enter the text in that file's own buffer. | 1122 ;; then enter the text in that file's own buffer. |
1122 | 1123 |
1123 ") | 1124 ") |
1124 "Initial message displayed in *scratch* buffer at startup. | 1125 "Initial message displayed in *scratch* buffer at startup. |
1125 If this is nil, no message will be displayed." | 1126 If this is nil, no message will be displayed. |
1127 If `inhibit-startup-screen' is non-nil, then no message is displayed, | |
1128 regardless of the value of this variable." | |
1126 :type '(choice (text :tag "Message") | 1129 :type '(choice (text :tag "Message") |
1127 (const :tag "none" nil)) | 1130 (const :tag "none" nil)) |
1128 :group 'initialization) | 1131 :group 'initialization) |
1129 | 1132 |
1130 | 1133 |
2119 ;; to command-line options can cause the last visible frame | 2122 ;; to command-line options can cause the last visible frame |
2120 ;; to be deleted. In this case, kill emacs to avoid an | 2123 ;; to be deleted. In this case, kill emacs to avoid an |
2121 ;; abort later. | 2124 ;; abort later. |
2122 (unless (frame-live-p (selected-frame)) (kill-emacs nil)))))) | 2125 (unless (frame-live-p (selected-frame)) (kill-emacs nil)))))) |
2123 | 2126 |
2124 ;; If *scratch* exists and is empty, insert initial-scratch-message. | |
2125 (and initial-scratch-message | |
2126 (get-buffer "*scratch*") | |
2127 (with-current-buffer "*scratch*" | |
2128 (when (zerop (buffer-size)) | |
2129 (insert initial-scratch-message) | |
2130 (set-buffer-modified-p nil)))) | |
2131 | |
2132 (if (or inhibit-startup-screen | 2127 (if (or inhibit-startup-screen |
2133 noninteractive | 2128 noninteractive |
2134 emacs-quick-startup) | 2129 emacs-quick-startup) |
2135 | 2130 |
2136 ;; Not displaying a startup screen. If 3 or more files | 2131 ;; Not displaying a startup screen. If 3 or more files |
2170 ;; ;; clicks the menu bar during the sit-for. | 2165 ;; ;; clicks the menu bar during the sit-for. |
2171 ;; (when (display-popup-menus-p) | 2166 ;; (when (display-popup-menus-p) |
2172 ;; (precompute-menubar-bindings)) | 2167 ;; (precompute-menubar-bindings)) |
2173 ;; (with-no-warnings | 2168 ;; (with-no-warnings |
2174 ;; (setq menubar-bindings-done t)) | 2169 ;; (setq menubar-bindings-done t)) |
2170 | |
2171 ;; If *scratch* exists and is empty, insert initial-scratch-message. | |
2172 (and initial-scratch-message | |
2173 (get-buffer "*scratch*") | |
2174 (with-current-buffer "*scratch*" | |
2175 (when (zerop (buffer-size)) | |
2176 (insert initial-scratch-message) | |
2177 (set-buffer-modified-p nil)))) | |
2175 | 2178 |
2176 (if (> file-count 0) | 2179 (if (> file-count 0) |
2177 (display-startup-screen t) | 2180 (display-startup-screen t) |
2178 (display-startup-screen nil))))) | 2181 (display-startup-screen nil))))) |
2179 | 2182 |