comparison lisp/startup.el @ 90602:b5c13d1564a9

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 437-446) - Update from CVS - lisp/url/url-methods.el: Fix format error when http_proxy is empty string - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 137-140) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-111
author Miles Bader <miles@gnu.org>
date Wed, 20 Sep 2006 06:04:23 +0000
parents a1a25ac6c88a 980586804d04
children bb0e318b7c53
comparison
equal deleted inserted replaced
90601:a1a25ac6c88a 90602:b5c13d1564a9
1112 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1112 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1113 ;;; Fancy splash screen 1113 ;;; Fancy splash screen
1114 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1114 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1115 1115
1116 (defvar fancy-splash-text 1116 (defvar fancy-splash-text
1117 '((:face variable-pitch 1117 '((:face (variable-pitch :weight bold)
1118 "You can do basic editing with the menu bar and scroll bar \
1119 using the mouse.\n\n"
1120 :face (variable-pitch :weight bold)
1121 "Important Help menu items:\n" 1118 "Important Help menu items:\n"
1122 :face variable-pitch 1119 :face variable-pitch
1123 (lambda () 1120 (lambda ()
1124 (let* ((en "TUTORIAL") 1121 (let* ((en "TUTORIAL")
1125 (tut (or (get-language-info current-language-environment 1122 (tut (or (get-language-info current-language-environment
1139 "" 1136 ""
1140 (concat " (" title ")")) 1137 (concat " (" title ")"))
1141 "\n"))) 1138 "\n")))
1142 :face variable-pitch "\ 1139 :face variable-pitch "\
1143 Emacs FAQ\tFrequently asked questions and answers 1140 Emacs FAQ\tFrequently asked questions and answers
1144 Read the Emacs Manual\tView the Emacs manual using Info 1141 View Emacs Manual\tView the Emacs manual using Info
1145 \(Non)Warranty\tGNU Emacs comes with " 1142 Absence of Warranty\tGNU Emacs comes with "
1146 :face (variable-pitch :slant oblique) 1143 :face (variable-pitch :slant oblique)
1147 "ABSOLUTELY NO WARRANTY\n" 1144 "ABSOLUTELY NO WARRANTY\n"
1148 :face variable-pitch 1145 :face variable-pitch
1149 "\ 1146 "\
1150 Copying Conditions\tConditions for redistributing and changing Emacs 1147 Copying Conditions\tConditions for redistributing and changing Emacs
1151 Getting New Versions\tHow to obtain the latest version of Emacs 1148 Getting New Versions\tHow to obtain the latest version of Emacs
1152 More Manuals / Ordering Manuals Buying printed manuals from the FSF\n") 1149 More Manuals / Ordering Manuals Buying printed manuals from the FSF\n")
1153 (:face variable-pitch 1150 (:face (variable-pitch :weight bold)
1154 "You can do basic editing with the menu bar and scroll bar \ 1151 "Useful File menu items:\n"
1155 using the mouse.\n\n" 1152 :face variable-pitch "\
1156 :face (variable-pitch :weight bold) 1153 Exit Emacs\t\t(Or type Control-x followed by Control-c)
1157 "Useful File menu items:\n"
1158 :face variable-pitch "\
1159 Exit Emacs\t(Or type Control-x followed by Control-c)
1160 Recover Crashed Session\tRecover files you were editing before a crash 1154 Recover Crashed Session\tRecover files you were editing before a crash
1155
1161 1156
1162 1157
1163 1158
1164 1159
1165 " 1160 "
1267 :face '(variable-pitch :foreground "red") 1262 :face '(variable-pitch :foreground "red")
1268 (if (eq system-type 'gnu/linux) 1263 (if (eq system-type 'gnu/linux)
1269 "GNU Emacs is one component of the GNU/Linux operating system." 1264 "GNU Emacs is one component of the GNU/Linux operating system."
1270 "GNU Emacs is one component of the GNU operating system.")) 1265 "GNU Emacs is one component of the GNU operating system."))
1271 (insert "\n") 1266 (insert "\n")
1267 (fancy-splash-insert
1268 :face 'variable-pitch
1269 "You can do basic editing with the menu bar and scroll bar \
1270 using the mouse.\n\n")
1272 (if fancy-splash-outer-buffer 1271 (if fancy-splash-outer-buffer
1273 (fancy-splash-insert 1272 (fancy-splash-insert
1274 :face 'variable-pitch 1273 :face 'variable-pitch
1275 (substitute-command-keys 1274 (substitute-command-keys
1276 (concat 1275 (concat
1303 (regexp-quote (file-name-nondirectory 1302 (regexp-quote (file-name-nondirectory
1304 auto-save-list-file-prefix))) 1303 auto-save-list-file-prefix)))
1305 t) 1304 t)
1306 (fancy-splash-insert :face '(variable-pitch :foreground "red") 1305 (fancy-splash-insert :face '(variable-pitch :foreground "red")
1307 "\n\nIf an Emacs session crashed recently, " 1306 "\n\nIf an Emacs session crashed recently, "
1308 "type M-x recover-session RET\nto recover" 1307 "type Meta-x recover-session RET\nto recover"
1309 " the files you were editing.")))) 1308 " the files you were editing."))))
1310 1309
1311 (defun fancy-splash-screens-1 (buffer) 1310 (defun fancy-splash-screens-1 (buffer)
1312 "Timer function displaying a splash screen." 1311 "Timer function displaying a splash screen."
1313 (when (> (float-time) fancy-splash-stop-time) 1312 (when (> (float-time) fancy-splash-stop-time)
1348 (throw 'exit nil)) 1347 (throw 'exit nil))
1349 1348
1350 1349
1351 (defun fancy-splash-screens (&optional hide-on-input) 1350 (defun fancy-splash-screens (&optional hide-on-input)
1352 "Display fancy splash screens when Emacs starts." 1351 "Display fancy splash screens when Emacs starts."
1353 (setq fancy-splash-help-echo (startup-echo-area-message))
1354 (if hide-on-input 1352 (if hide-on-input
1355 (let ((old-hourglass display-hourglass) 1353 (let ((old-hourglass display-hourglass)
1356 (fancy-splash-outer-buffer (current-buffer)) 1354 (fancy-splash-outer-buffer (current-buffer))
1357 splash-buffer 1355 splash-buffer
1358 (old-minor-mode-map-alist minor-mode-map-alist) 1356 (old-minor-mode-map-alist minor-mode-map-alist)
1360 (frame (fancy-splash-frame)) 1358 (frame (fancy-splash-frame))
1361 timer) 1359 timer)
1362 (save-selected-window 1360 (save-selected-window
1363 (select-frame frame) 1361 (select-frame frame)
1364 (switch-to-buffer "GNU Emacs") 1362 (switch-to-buffer "GNU Emacs")
1365 (setq tab-width 20)
1366 (setq splash-buffer (current-buffer)) 1363 (setq splash-buffer (current-buffer))
1367 (catch 'stop-splashing 1364 (catch 'stop-splashing
1368 (unwind-protect 1365 (unwind-protect
1369 (let ((map (make-sparse-keymap))) 1366 (let ((map (make-sparse-keymap))
1367 (cursor-type nil))
1370 (use-local-map map) 1368 (use-local-map map)
1371 (define-key map [switch-frame] 'ignore) 1369 (define-key map [switch-frame] 'ignore)
1372 (define-key map [t] 'fancy-splash-default-action) 1370 (define-key map [t] 'fancy-splash-default-action)
1373 (define-key map [mouse-movement] 'ignore) 1371 (define-key map [mouse-movement] 'ignore)
1374 (define-key map [mode-line t] 'ignore) 1372 (define-key map [mode-line t] 'ignore)
1375 (setq cursor-type nil 1373 (setq display-hourglass nil
1376 display-hourglass nil
1377 minor-mode-map-alist nil 1374 minor-mode-map-alist nil
1378 emulation-mode-map-alists nil 1375 emulation-mode-map-alists nil
1379 buffer-undo-list t 1376 buffer-undo-list t
1380 mode-line-format (propertize "---- %b %-" 1377 mode-line-format (propertize "---- %b %-"
1381 'face 'mode-line-buffer-id) 1378 'face 'mode-line-buffer-id)
1382 fancy-splash-stop-time (+ (float-time) 1379 fancy-splash-stop-time (+ (float-time)
1383 fancy-splash-max-time) 1380 fancy-splash-max-time)
1384 timer (run-with-timer 0 fancy-splash-delay 1381 timer (run-with-timer 0 fancy-splash-delay
1385 #'fancy-splash-screens-1 1382 #'fancy-splash-screens-1
1386 splash-buffer)) 1383 splash-buffer))
1384 (message "%s" (startup-echo-area-message))
1387 (recursive-edit)) 1385 (recursive-edit))
1388 (cancel-timer timer) 1386 (cancel-timer timer)
1389 (setq display-hourglass old-hourglass 1387 (setq display-hourglass old-hourglass
1390 minor-mode-map-alist old-minor-mode-map-alist 1388 minor-mode-map-alist old-minor-mode-map-alist
1391 emulation-mode-map-alists old-emulation-mode-map-alists) 1389 emulation-mode-map-alists old-emulation-mode-map-alists)
1402 Warning Warning!!! Pure space overflow !!!Warning Warning 1400 Warning Warning!!! Pure space overflow !!!Warning Warning
1403 \(See the node Pure Storage in the Lisp manual for details.)\n")) 1401 \(See the node Pure Storage in the Lisp manual for details.)\n"))
1404 (let (fancy-splash-outer-buffer) 1402 (let (fancy-splash-outer-buffer)
1405 (fancy-splash-head) 1403 (fancy-splash-head)
1406 (dolist (text fancy-splash-text) 1404 (dolist (text fancy-splash-text)
1407 (apply #'fancy-splash-insert text)) 1405 (apply #'fancy-splash-insert text)
1406 (insert "\n"))
1407 (skip-chars-backward "\n")
1408 (delete-region (point) (point-max))
1409 (insert "\n")
1408 (fancy-splash-tail) 1410 (fancy-splash-tail)
1409 (set-buffer-modified-p nil) 1411 (set-buffer-modified-p nil)
1410 (setq buffer-read-only t) 1412 (setq buffer-read-only t)
1411 (if (and view-read-only (not view-mode)) 1413 (if (and view-read-only (not view-mode))
1412 (view-mode-enter nil 'kill-buffer)) 1414 (view-mode-enter nil 'kill-buffer))
1579 (concat "\\`" 1581 (concat "\\`"
1580 (regexp-quote (file-name-nondirectory 1582 (regexp-quote (file-name-nondirectory
1581 auto-save-list-file-prefix))) 1583 auto-save-list-file-prefix)))
1582 t) 1584 t)
1583 (insert "\n\nIf an Emacs session crashed recently, " 1585 (insert "\n\nIf an Emacs session crashed recently, "
1584 "type M-x recover-session RET\nto recover" 1586 "type Meta-x recover-session RET\nto recover"
1585 " the files you were editing.")) 1587 " the files you were editing."))
1586 1588
1587 ;; Display the input that we set up in the buffer. 1589 ;; Display the input that we set up in the buffer.
1588 (set-buffer-modified-p nil) 1590 (set-buffer-modified-p nil)
1589 (setq buffer-read-only t) 1591 (setq buffer-read-only t)