1334 |
|
|
1335 |
(defun normal-splash-screen () |
(defun normal-splash-screen () |
1336 |
"Display splash screen when Emacs starts." |
"Display splash screen when Emacs starts." |
1337 |
(with-current-buffer (get-buffer-create "GNU Emacs") |
(let ((prev-buffer (current-buffer))) |
1338 |
(let ((tab-width 8) |
(unwind-protect |
1339 |
(mode-line-format (propertize "---- %b %-" |
(with-current-buffer (get-buffer-create "GNU Emacs") |
1340 |
'face '(:weight bold)))) |
(let ((tab-width 8) |
1341 |
|
(mode-line-format (propertize "---- %b %-" |
1342 |
;; The convention for this piece of code is that |
'face '(:weight bold)))) |
1343 |
;; each piece of output starts with one or two newlines |
|
1344 |
;; and does not end with any newlines. |
;; The convention for this piece of code is that |
1345 |
(insert "Welcome to GNU Emacs") |
;; each piece of output starts with one or two newlines |
1346 |
(if (eq system-type 'gnu/linux) |
;; and does not end with any newlines. |
1347 |
(insert ", one component of a Linux-based GNU system.")) |
(insert "Welcome to GNU Emacs") |
1348 |
(insert "\n") |
(if (eq system-type 'gnu/linux) |
1349 |
|
(insert ", one component of a Linux-based GNU system.")) |
1350 |
(unless (equal (buffer-name (current-buffer)) "*scratch*") |
(insert "\n") |
1351 |
(insert (substitute-command-keys |
|
1352 |
"\nType \\[recenter] to begin editing your file.\n"))) |
(unless (equal (buffer-name prev-buffer) "*scratch*") |
1353 |
|
(insert (substitute-command-keys |
1354 |
(if (display-mouse-p) |
"\nType \\[recenter] to begin editing your file.\n"))) |
1355 |
;; The user can use the mouse to activate menus |
|
1356 |
;; so give help in terms of menu items. |
(if (display-mouse-p) |
1357 |
(progn |
;; The user can use the mouse to activate menus |
1358 |
(insert "\ |
;; so give help in terms of menu items. |
1359 |
|
(progn |
1360 |
|
(insert "\ |
1361 |
You can do basic editing with the menu bar and scroll bar using the mouse. |
You can do basic editing with the menu bar and scroll bar using the mouse. |
1362 |
|
|
1363 |
Useful File menu items: |
Useful File menu items: |
1373 |
Getting New Versions How to obtain the latest version of Emacs. |
Getting New Versions How to obtain the latest version of Emacs. |
1374 |
More Manuals / Ordering Manuals How to order printed manuals from the FSF. |
More Manuals / Ordering Manuals How to order printed manuals from the FSF. |
1375 |
") |
") |
1376 |
(insert "\n\n" (emacs-version) |
(insert "\n\n" (emacs-version) |
1377 |
" |
" |
1378 |
Copyright (C) 2002 Free Software Foundation, Inc.")) |
Copyright (C) 2002 Free Software Foundation, Inc.")) |
1379 |
|
|
1380 |
;; No mouse menus, so give help using kbd commands. |
;; No mouse menus, so give help using kbd commands. |
1381 |
|
|
1382 |
;; If keys have their default meanings, |
;; If keys have their default meanings, |
1383 |
;; use precomputed string to save lots of time. |
;; use precomputed string to save lots of time. |
1384 |
(if (and (eq (key-binding "\C-h") 'help-command) |
(if (and (eq (key-binding "\C-h") 'help-command) |
1385 |
(eq (key-binding "\C-xu") 'advertised-undo) |
(eq (key-binding "\C-xu") 'advertised-undo) |
1386 |
(eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs) |
(eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs) |
1387 |
(eq (key-binding "\C-ht") 'help-with-tutorial) |
(eq (key-binding "\C-ht") 'help-with-tutorial) |
1388 |
(eq (key-binding "\C-hi") 'info) |
(eq (key-binding "\C-hi") 'info) |
1389 |
(eq (key-binding "\C-hr") 'info-emacs-manual) |
(eq (key-binding "\C-hr") 'info-emacs-manual) |
1390 |
(eq (key-binding "\C-h\C-n") 'view-emacs-news)) |
(eq (key-binding "\C-h\C-n") 'view-emacs-news)) |
1391 |
(insert " |
(insert " |
1392 |
Get help C-h (Hold down CTRL and press h) |
Get help C-h (Hold down CTRL and press h) |
1393 |
Emacs manual C-h r |
Emacs manual C-h r |
1394 |
Emacs tutorial C-h t Undo changes C-x u |
Emacs tutorial C-h t Undo changes C-x u |
1395 |
Buy manuals C-h C-m Exit Emacs C-x C-c |
Buy manuals C-h C-m Exit Emacs C-x C-c |
1396 |
Browse manuals C-h i") |
Browse manuals C-h i") |
1397 |
|
|
1398 |
(insert (substitute-command-keys |
(insert (substitute-command-keys |
1399 |
(format "\n |
(format "\n |
1400 |
Get help %s |
Get help %s |
1401 |
Emacs manual \\[info-emacs-manual] |
Emacs manual \\[info-emacs-manual] |
1402 |
Emacs tutorial \\[help-with-tutorial] Undo changes \\[advertised-undo] |
Emacs tutorial \\[help-with-tutorial]\tUndo changes\t\\[advertised-undo] |
1403 |
Buy manuals \\[view-order-manuals] Exit Emacs \\[save-buffers-kill-emacs] |
Buy manuals \\[view-order-manuals]\tExit Emacs\t\\[save-buffers-kill-emacs] |
1404 |
Browse manuals \\[info]" |
Browse manuals \\[info]" |
1405 |
(let ((where (where-is-internal |
(let ((where (where-is-internal |
1406 |
'help-command nil t))) |
'help-command nil t))) |
1407 |
(if where |
(if where |
1408 |
(key-description where) |
(key-description where) |
1409 |
"M-x help")))))) |
"M-x help")))))) |
1410 |
|
|
1411 |
;; Say how to use the menu bar with the keyboard. |
;; Say how to use the menu bar with the keyboard. |
1412 |
(if (and (eq (key-binding "\M-`") 'tmm-menubar) |
(if (and (eq (key-binding "\M-`") 'tmm-menubar) |
1413 |
(eq (key-binding [f10]) 'tmm-menubar)) |
(eq (key-binding [f10]) 'tmm-menubar)) |
1414 |
(insert " |
(insert " |
1415 |
Activate menubar F10 or ESC ` or M-`") |
Activate menubar F10 or ESC ` or M-`") |
1416 |
(insert (substitute-command-keys " |
(insert (substitute-command-keys " |
1417 |
Activate menubar \\[tmm-menubar]"))) |
Activate menubar \\[tmm-menubar]"))) |
1418 |
|
|
1419 |
;; Many users seem to have problems with these. |
;; Many users seem to have problems with these. |
1420 |
(insert " |
(insert " |
1421 |
\(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. |
\(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. |
1422 |
If you have no Meta key, you may instead type ESC followed by the character.)") |
If you have no Meta key, you may instead type ESC followed by the character.)") |
1423 |
|
|
1424 |
(insert "\n\n" (emacs-version) |
(insert "\n\n" (emacs-version) |
1425 |
" |
" |
1426 |
Copyright (C) 2002 Free Software Foundation, Inc.") |
Copyright (C) 2002 Free Software Foundation, Inc.") |
1427 |
|
|
1428 |
(if (and (eq (key-binding "\C-h\C-c") 'describe-copying) |
(if (and (eq (key-binding "\C-h\C-c") 'describe-copying) |
1429 |
(eq (key-binding "\C-h\C-d") 'describe-distribution) |
(eq (key-binding "\C-h\C-d") 'describe-distribution) |
1430 |
(eq (key-binding "\C-h\C-w") 'describe-no-warranty)) |
(eq (key-binding "\C-h\C-w") 'describe-no-warranty)) |
1431 |
(insert |
(insert |
1432 |
"\n |
"\n |
1433 |
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details. |
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details. |
1434 |
Emacs is Free Software--Free as in Freedom--so you can redistribute copies |
Emacs is Free Software--Free as in Freedom--so you can redistribute copies |
1435 |
of Emacs and modify it; type C-h C-c to see the conditions. |
of Emacs and modify it; type C-h C-c to see the conditions. |
1436 |
Type C-h C-d for information on getting the latest version.") |
Type C-h C-d for information on getting the latest version.") |
1437 |
(insert (substitute-command-keys |
(insert (substitute-command-keys |
1438 |
"\n |
"\n |
1439 |
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details. |
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details. |
1440 |
Emacs is Free Software--Free as in Freedom--so you can redistribute copies |
Emacs is Free Software--Free as in Freedom--so you can redistribute copies |
1441 |
of Emacs and modify it; type \\[describe-copying] to see the conditions. |
of Emacs and modify it; type \\[describe-copying] to see the conditions. |
1442 |
Type \\[describe-distribution] for information on getting the latest version.")))) |
Type \\[describe-distribution] for information on getting the latest version.")))) |
1443 |
|
|
1444 |
;; The rest of the startup screen is the same on all |
;; The rest of the startup screen is the same on all |
1445 |
;; kinds of terminals. |
;; kinds of terminals. |
1446 |
|
|
1447 |
|
;; Give information on recovering, if there was a crash. |
1448 |
|
(and auto-save-list-file-prefix |
1449 |
|
;; Don't signal an error if the |
1450 |
|
;; directory for auto-save-list files |
1451 |
|
;; does not yet exist. |
1452 |
|
(file-directory-p (file-name-directory |
1453 |
|
auto-save-list-file-prefix)) |
1454 |
|
(directory-files |
1455 |
|
(file-name-directory auto-save-list-file-prefix) |
1456 |
|
nil |
1457 |
|
(concat "\\`" |
1458 |
|
(regexp-quote (file-name-nondirectory |
1459 |
|
auto-save-list-file-prefix))) |
1460 |
|
t) |
1461 |
|
(insert "\n\nIf an Emacs session crashed recently, " |
1462 |
|
"type M-x recover-session RET\nto recover" |
1463 |
|
" the files you were editing.")) |
1464 |
|
|
1465 |
|
;; Display the input that we set up in the buffer. |
1466 |
|
(set-buffer-modified-p nil) |
1467 |
|
(goto-char (point-min)) |
1468 |
|
(save-window-excursion |
1469 |
|
(switch-to-buffer (current-buffer)) |
1470 |
|
(sit-for 120)))) |
1471 |
|
;; Unwind ... ensure splash buffer is killed |
1472 |
|
(kill-buffer "GNU Emacs")))) |
1473 |
|
|
|
;; Give information on recovering, if there was a crash. |
|
|
(and auto-save-list-file-prefix |
|
|
;; Don't signal an error if the |
|
|
;; directory for auto-save-list files |
|
|
;; does not yet exist. |
|
|
(file-directory-p (file-name-directory |
|
|
auto-save-list-file-prefix)) |
|
|
(directory-files |
|
|
(file-name-directory auto-save-list-file-prefix) |
|
|
nil |
|
|
(concat "\\`" |
|
|
(regexp-quote (file-name-nondirectory |
|
|
auto-save-list-file-prefix))) |
|
|
t) |
|
|
(insert "\n\nIf an Emacs session crashed recently, " |
|
|
"type M-x recover-session RET\nto recover" |
|
|
" the files you were editing.")) |
|
|
|
|
|
;; Display the input that we set up in the buffer. |
|
|
(set-buffer-modified-p nil) |
|
|
(goto-char (point-min)) |
|
|
(save-window-excursion |
|
|
(switch-to-buffer (current-buffer)) |
|
|
(sit-for 120)))) |
|
|
(kill-buffer "GNU Emacs")) |
|
1474 |
|
|
1475 |
(defun startup-echo-area-message () |
(defun startup-echo-area-message () |
1476 |
(if (eq (key-binding "\C-h\C-p") 'describe-project) |
(if (eq (key-binding "\C-h\C-p") 'describe-project) |