Changeset 4166 for trunk/lisp/startup.el
- Timestamp:
- 09/18/06 20:48:14 (2 years ago)
- Files:
-
- trunk/lisp/startup.el (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/startup.el
r4161 r4166 1114 1114 1115 1115 (defvar fancy-splash-text 1116 '((:face variable-pitch 1117 "You can do basic editing with the menu bar and scroll bar \ 1118 using the mouse.\n\n" 1119 :face (variable-pitch :weight bold) 1116 '((:face (variable-pitch :weight bold) 1120 1117 "Important Help menu items:\n" 1121 1118 :face variable-pitch … … 1141 1138 :face variable-pitch "\ 1142 1139 Emacs FAQ\tFrequently asked questions and answers 1143 Read theEmacs Manual\tView the Emacs manual using Info1144 \(Non)Warranty\tGNU Emacs comes with "1140 View Emacs Manual\tView the Emacs manual using Info 1141 Absence of Warranty\tGNU Emacs comes with " 1145 1142 :face (variable-pitch :slant oblique) 1146 1143 "ABSOLUTELY NO WARRANTY\n" … … 1150 1147 Getting New Versions\tHow to obtain the latest version of Emacs 1151 1148 More Manuals / Ordering Manuals Buying printed manuals from the FSF\n") 1152 (:face variable-pitch 1153 "You can do basic editing with the menu bar and scroll bar \ 1154 using the mouse.\n\n" 1155 :face (variable-pitch :weight bold) 1156 "Useful File menu items:\n" 1157 :face variable-pitch "\ 1158 Exit Emacs\t(Or type Control-x followed by Control-c) 1149 (:face (variable-pitch :weight bold) 1150 "Useful File menu items:\n" 1151 :face variable-pitch "\ 1152 Exit Emacs\t\t(Or type Control-x followed by Control-c) 1159 1153 Recover Crashed Session\tRecover files you were editing before a crash 1154 1160 1155 1161 1156 … … 1266 1261 "GNU Emacs is one component of the GNU operating system.")) 1267 1262 (insert "\n") 1263 (fancy-splash-insert 1264 :face 'variable-pitch 1265 "You can do basic editing with the menu bar and scroll bar \ 1266 using the mouse.\n\n") 1268 1267 (if fancy-splash-outer-buffer 1269 1268 (fancy-splash-insert … … 1302 1301 (fancy-splash-insert :face '(variable-pitch :foreground "red") 1303 1302 "\n\nIf an Emacs session crashed recently, " 1304 "type M -x recover-session RET\nto recover"1303 "type Meta-x recover-session RET\nto recover" 1305 1304 " the files you were editing.")))) 1306 1305 … … 1347 1346 (defun fancy-splash-screens (&optional hide-on-input) 1348 1347 "Display fancy splash screens when Emacs starts." 1349 (setq fancy-splash-help-echo (startup-echo-area-message))1350 1348 (if hide-on-input 1351 1349 (let ((old-hourglass display-hourglass) … … 1359 1357 (select-frame frame) 1360 1358 (switch-to-buffer "GNU Emacs") 1361 (setq tab-width 20)1362 1359 (setq splash-buffer (current-buffer)) 1363 1360 (catch 'stop-splashing 1364 1361 (unwind-protect 1365 (let ((map (make-sparse-keymap))) 1362 (let ((map (make-sparse-keymap)) 1363 (cursor-type nil)) 1366 1364 (use-local-map map) 1367 1365 (define-key map [switch-frame] 'ignore) … … 1369 1367 (define-key map [mouse-movement] 'ignore) 1370 1368 (define-key map [mode-line t] 'ignore) 1371 (setq cursor-type nil 1372 display-hourglass nil 1369 (setq display-hourglass nil 1373 1370 minor-mode-map-alist nil 1374 1371 emulation-mode-map-alists nil … … 1381 1378 #'fancy-splash-screens-1 1382 1379 splash-buffer)) 1380 (message "%s" (startup-echo-area-message)) 1383 1381 (recursive-edit)) 1384 1382 (cancel-timer timer) … … 1387 1385 emulation-mode-map-alists old-emulation-mode-map-alists) 1388 1386 (kill-buffer splash-buffer))))) 1389 ;; If hide-on-input is n on-nil, don't hide the buffer on input.1387 ;; If hide-on-input is nil, don't hide the buffer on input. 1390 1388 (if (or (window-minibuffer-p) 1391 1389 (window-dedicated-p (selected-window))) … … 1401 1399 (fancy-splash-head) 1402 1400 (dolist (text fancy-splash-text) 1403 (apply #'fancy-splash-insert text)) 1401 (apply #'fancy-splash-insert text) 1402 (insert "\n")) 1403 (skip-chars-backward "\n") 1404 (delete-region (point) (point-max)) 1405 (insert "\n") 1404 1406 (fancy-splash-tail) 1405 1407 (set-buffer-modified-p nil) … … 1578 1580 t) 1579 1581 (insert "\n\nIf an Emacs session crashed recently, " 1580 "type M -x recover-session RET\nto recover"1582 "type Meta-x recover-session RET\nto recover" 1581 1583 " the files you were editing.")) 1582 1584 … … 1587 1589 (view-mode-enter nil 'kill-buffer)) 1588 1590 (goto-char (point-min)) 1589 (if (or (window-minibuffer-p) 1590 (window-dedicated-p (selected-window)))1591 ;; If hide-on-input is nil, creating a new frame will 1592 ;; generate enough events that the subsequent `sit-for' 1593 ;; will immediately return anyway. 1594 (pop-to-buffer (current-buffer)) 1595 (if hide-on-input 1591 (if hide-on-input 1592 (if (or (window-minibuffer-p) 1593 (window-dedicated-p (selected-window))) 1594 ;; If hide-on-input is nil, creating a new frame will 1595 ;; generate enough events that the subsequent `sit-for' 1596 ;; will immediately return anyway. 1597 nil ;; (pop-to-buffer (current-buffer)) 1596 1598 (save-window-excursion 1597 (switch-to-buffer (current-buffer)) 1598 (sit-for 120)) 1599 (switch-to-buffer (current-buffer))))) 1599 (switch-to-buffer (current-buffer)) 1600 (sit-for 120))) 1601 (condition-case nil 1602 (switch-to-buffer (current-buffer)) 1603 ;; In case the window is dedicated or something. 1604 (error (pop-to-buffer (current-buffer)))))) 1600 1605 ;; Unwind ... ensure splash buffer is killed 1601 1606 (if hide-on-input
