diff options
| author | Richard M. Stallman | 2007-09-05 19:59:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-09-05 19:59:01 +0000 |
| commit | fad930b66dfefc13e7e98e0a1b1da444a8e10197 (patch) | |
| tree | 5c24409a0651024fd3e59caf0146dcec080237c9 | |
| parent | e8449cdb492acfb6ca1596022f6bda008ad55009 (diff) | |
| download | emacs-fad930b66dfefc13e7e98e0a1b1da444a8e10197.tar.gz emacs-fad930b66dfefc13e7e98e0a1b1da444a8e10197.zip | |
(fancy-startup-text): Renamed from fancy-splash-text.
Several items removed, simplified, or put on one line.
(fancy-about-text): Add substantial contents, part of startup text.
(fancy-splash-head): Make "GNU" or "GNU/Linux" a link.
(normal-splash-screen): Call normal-mouse-startup-screen,
normal-no-mouse-startup-screen, or normal-about-screen.
(normal-mouse-startup-screen): New fn, broken out, shortened.
(normal-no-mouse-startup-screen): New fn, broken out.
(normal-about-screen): New function, contents all new.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/startup.el | 576 |
2 files changed, 323 insertions, 265 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f808f82ab04..dbc3fb6fecb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2007-09-05 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * startup.el (fancy-startup-text): Renamed from fancy-splash-text. | ||
| 4 | Several items removed, simplified, or put on one line. | ||
| 5 | (fancy-about-text): Add substantial contents, part of startup text. | ||
| 6 | (fancy-splash-head): Make "GNU" or "GNU/Linux" a link. | ||
| 7 | (normal-splash-screen): Call normal-mouse-startup-screen, | ||
| 8 | normal-no-mouse-startup-screen, or normal-about-screen. | ||
| 9 | (normal-mouse-startup-screen): New fn, broken out, shortened. | ||
| 10 | (normal-no-mouse-startup-screen): New fn, broken out. | ||
| 11 | (normal-about-screen): New function, contents all new. | ||
| 12 | |||
| 1 | 2007-09-05 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> | 13 | 2007-09-05 Micha,Ak(Bl Cadilhac <michael@cadilhac.name> |
| 2 | 14 | ||
| 3 | * emacs-lisp/rx.el (rx): Fix typo in docstring. | 15 | * emacs-lisp/rx.el (rx): Fix typo in docstring. |
diff --git a/lisp/startup.el b/lisp/startup.el index 0fc2c7306d2..e469f87ba9f 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1134,73 +1134,93 @@ regardless of the value of this variable." | |||
| 1134 | ;;; Fancy splash screen | 1134 | ;;; Fancy splash screen |
| 1135 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1135 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1136 | 1136 | ||
| 1137 | (defvar fancy-splash-text | 1137 | (defvar fancy-startup-text |
| 1138 | '((:face (variable-pitch :weight bold) | 1138 | '((:face variable-pitch |
| 1139 | "Important Help menu items:\n" | 1139 | :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) |
| 1140 | :face variable-pitch | 1140 | "\tLearn basic Emacs keystroke commands" |
| 1141 | :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) | 1141 | (lambda () |
| 1142 | "\tLearn how to use Emacs efficiently" | 1142 | (let* ((en "TUTORIAL") |
| 1143 | (lambda () | 1143 | (tut (or (get-language-info current-language-environment |
| 1144 | (let* ((en "TUTORIAL") | 1144 | 'tutorial) |
| 1145 | (tut (or (get-language-info current-language-environment | 1145 | en)) |
| 1146 | 'tutorial) | 1146 | (title (with-temp-buffer |
| 1147 | en)) | 1147 | (insert-file-contents |
| 1148 | (title (with-temp-buffer | 1148 | (expand-file-name tut tutorial-directory) |
| 1149 | (insert-file-contents | 1149 | nil 0 256) |
| 1150 | (expand-file-name tut tutorial-directory) | 1150 | (search-forward ".") |
| 1151 | nil 0 256) | 1151 | (buffer-substring (point-min) (1- (point)))))) |
| 1152 | (search-forward ".") | 1152 | ;; If there is a specific tutorial for the current language |
| 1153 | (buffer-substring (point-min) (1- (point)))))) | 1153 | ;; environment and it is not English, append its title. |
| 1154 | ;; If there is a specific tutorial for the current language | 1154 | (if (string= en tut) |
| 1155 | ;; environment and it is not English, append its title. | 1155 | "" |
| 1156 | (if (string= en tut) | 1156 | (concat " (" title ")")))) |
| 1157 | "" | 1157 | "\n" |
| 1158 | (concat " (" title ")")))) | 1158 | :face variable-pitch |
| 1159 | "\n" | 1159 | :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) |
| 1160 | :face variable-pitch | 1160 | "\tView the Emacs manual using Info\n" |
| 1161 | :link ("Emacs FAQ" (lambda (button) (view-emacs-FAQ))) | 1161 | :link ("Emacs Guided Tour" |
| 1162 | "\tFrequently asked questions and answers\n" | 1162 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) |
| 1163 | :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) | 1163 | "\tOverview of Emacs features\n" |
| 1164 | "\tView the Emacs manual using Info\n" | 1164 | :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) |
| 1165 | :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) | 1165 | "\tGNU Emacs comes with " |
| 1166 | "\tGNU Emacs comes with " | 1166 | :face (variable-pitch :slant oblique) |
| 1167 | :face (variable-pitch :slant oblique) | 1167 | "ABSOLUTELY NO WARRANTY\n" |
| 1168 | "ABSOLUTELY NO WARRANTY\n" | 1168 | :face variable-pitch |
| 1169 | :face variable-pitch | 1169 | :link ("Copying Conditions" (lambda (button) (describe-copying))) |
| 1170 | :link ("Copying Conditions" (lambda (button) (describe-copying))) | 1170 | "\tConditions for redistributing and changing Emacs\n" |
| 1171 | "\tConditions for redistributing and changing Emacs\n" | 1171 | :link ("More Manuals / Ordering" (lambda (button) (view-order-manuals))) |
| 1172 | :link ("Getting New Versions" (lambda (button) (describe-distribution))) | 1172 | "\tThe FSF sells printed copies of several manuals for Emacs\n" |
| 1173 | "\tHow to obtain the latest version of Emacs\n" | 1173 | "\n" |
| 1174 | :link ("More Manuals / Ordering Manuals" (lambda (button) (view-order-manuals))) | 1174 | "To start... " |
| 1175 | " Buying printed manuals from the FSF\n") | 1175 | :link ("Open a File" |
| 1176 | (:face (variable-pitch :weight bold) | 1176 | (lambda (button) (call-interactively 'find-file))) |
| 1177 | "Useful tasks:\n" | 1177 | "\t" |
| 1178 | :face variable-pitch | 1178 | :link ("Open Home Directory" |
| 1179 | :link ("Visit New File" | 1179 | (lambda (button) (dired "~"))) |
| 1180 | (lambda (button) (call-interactively 'find-file))) | 1180 | "\n")) |
| 1181 | "\tSpecify a new file's name, to edit the file\n" | ||
| 1182 | :link ("Open Home Directory" | ||
| 1183 | (lambda (button) (dired "~"))) | ||
| 1184 | "\tOpen your home directory, to operate on its files\n" | ||
| 1185 | :link ("Open *scratch* buffer" | ||
| 1186 | (lambda (button) (switch-to-buffer (get-buffer-create "*scratch*")))) | ||
| 1187 | "\tOpen buffer for notes you don't want to save\n" | ||
| 1188 | :link ("Customize Startup" | ||
| 1189 | (lambda (button) (customize-group 'initialization))) | ||
| 1190 | "\tChange initialization settings including this screen\n" | ||
| 1191 | |||
| 1192 | "\nEmacs Guided Tour\tSee " | ||
| 1193 | :link ("http://www.gnu.org/software/emacs/tour/" | ||
| 1194 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) | ||
| 1195 | |||
| 1196 | )) | ||
| 1197 | "A list of texts to show in the middle part of splash screens. | 1181 | "A list of texts to show in the middle part of splash screens. |
| 1198 | Each element in the list should be a list of strings or pairs | 1182 | Each element in the list should be a list of strings or pairs |
| 1199 | `:face FACE', like `fancy-splash-insert' accepts them.") | 1183 | `:face FACE', like `fancy-splash-insert' accepts them.") |
| 1200 | 1184 | ||
| 1201 | (defvar fancy-about-text | 1185 | (defvar fancy-about-text |
| 1202 | '((:face variable-pitch | 1186 | '((:face variable-pitch |
| 1203 | )) | 1187 | :link ("GNU and Freedom" (lambda (button) (describe-project))) |
| 1188 | "\tWhy we developed GNU Emacs, and the GNU operating system\n" | ||
| 1189 | :link ("Absence of Warranty" (lambda (button) (describe-no-warranty))) | ||
| 1190 | "\tGNU Emacs comes with " | ||
| 1191 | :face (variable-pitch :slant oblique) | ||
| 1192 | "ABSOLUTELY NO WARRANTY\n" | ||
| 1193 | :face variable-pitch | ||
| 1194 | :link ("Copying Conditions" (lambda (button) (describe-copying))) | ||
| 1195 | "\tConditions for redistributing and changing Emacs\n" | ||
| 1196 | :link ("Getting New Versions" (lambda (button) (describe-distribution))) | ||
| 1197 | "\tHow to obtain the latest version of Emacs\n" | ||
| 1198 | :link ("More Manuals / Ordering Manuals" (lambda (button) (view-order-manuals))) | ||
| 1199 | " Buying printed manuals from the FSF\n" | ||
| 1200 | "\n" | ||
| 1201 | :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) | ||
| 1202 | "\tLearn basic Emacs keystroke commands" | ||
| 1203 | (lambda () | ||
| 1204 | (let* ((en "TUTORIAL") | ||
| 1205 | (tut (or (get-language-info current-language-environment | ||
| 1206 | 'tutorial) | ||
| 1207 | en)) | ||
| 1208 | (title (with-temp-buffer | ||
| 1209 | (insert-file-contents | ||
| 1210 | (expand-file-name tut tutorial-directory) | ||
| 1211 | nil 0 256) | ||
| 1212 | (search-forward ".") | ||
| 1213 | (buffer-substring (point-min) (1- (point)))))) | ||
| 1214 | ;; If there is a specific tutorial for the current language | ||
| 1215 | ;; environment and it is not English, append its title. | ||
| 1216 | (if (string= en tut) | ||
| 1217 | "" | ||
| 1218 | (concat " (" title ")")))) | ||
| 1219 | "\n" | ||
| 1220 | :link ("Emacs Guided Tour" | ||
| 1221 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) | ||
| 1222 | "\tSee an overview of the many facilities of GNU Emacs" | ||
| 1223 | )) | ||
| 1204 | "A list of texts to show in the middle part of the About screen. | 1224 | "A list of texts to show in the middle part of the About screen. |
| 1205 | Each element in the list should be a list of strings or pairs | 1225 | Each element in the list should be a list of strings or pairs |
| 1206 | `:face FACE', like `fancy-splash-insert' accepts them.") | 1226 | `:face FACE', like `fancy-splash-insert' accepts them.") |
| @@ -1291,11 +1311,15 @@ where FACE is a valid face specification, as it can be used with | |||
| 1291 | 'action (lambda (button) (browse-url "http://www.gnu.org/")) | 1311 | 'action (lambda (button) (browse-url "http://www.gnu.org/")) |
| 1292 | 'follow-link t) | 1312 | 'follow-link t) |
| 1293 | (insert "\n")))) | 1313 | (insert "\n")))) |
| 1314 | (insert "\n") | ||
| 1294 | (fancy-splash-insert | 1315 | (fancy-splash-insert |
| 1295 | :face '(variable-pitch :foreground "red") | 1316 | :face '(variable-pitch :foreground "red") |
| 1317 | "GNU Emacs is one component of the " | ||
| 1318 | :link | ||
| 1296 | (if (eq system-type 'gnu/linux) | 1319 | (if (eq system-type 'gnu/linux) |
| 1297 | "GNU Emacs is one component of the GNU/Linux operating system." | 1320 | '("GNU/Linux" (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html"))) |
| 1298 | "GNU Emacs is one component of the GNU operating system.")) | 1321 | '("GNU" (lambda (button) (describe-project)))) |
| 1322 | " operating system.") | ||
| 1299 | (insert "\n") | 1323 | (insert "\n") |
| 1300 | (if startup | 1324 | (if startup |
| 1301 | (fancy-splash-insert | 1325 | (fancy-splash-insert |
| @@ -1397,7 +1421,7 @@ Warning Warning!!! Pure space overflow !!!Warning Warning | |||
| 1397 | Warning Warning!!! Pure space overflow !!!Warning Warning | 1421 | Warning Warning!!! Pure space overflow !!!Warning Warning |
| 1398 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | 1422 | \(See the node Pure Storage in the Lisp manual for details.)\n")) |
| 1399 | (fancy-splash-head startup) | 1423 | (fancy-splash-head startup) |
| 1400 | (dolist (text fancy-splash-text) | 1424 | (dolist (text fancy-startup-text) |
| 1401 | (apply #'fancy-splash-insert text) | 1425 | (apply #'fancy-splash-insert text) |
| 1402 | (insert "\n")) | 1426 | (insert "\n")) |
| 1403 | (skip-chars-backward "\n") | 1427 | (skip-chars-backward "\n") |
| @@ -1473,214 +1497,18 @@ Warning Warning!!! Pure space overflow !!!Warning Warning | |||
| 1473 | ", one component of the GNU/Linux operating system.\n" | 1497 | ", one component of the GNU/Linux operating system.\n" |
| 1474 | ", a part of the GNU operating system.\n")) | 1498 | ", a part of the GNU operating system.\n")) |
| 1475 | 1499 | ||
| 1500 | (insert "\n") | ||
| 1501 | |||
| 1476 | (if startup | 1502 | (if startup |
| 1477 | (if (display-mouse-p) | 1503 | (if (display-mouse-p) |
| 1478 | ;; The user can use the mouse to activate menus | 1504 | ;; The user can use the mouse to activate menus |
| 1479 | ;; so give help in terms of menu items. | 1505 | ;; so give help in terms of menu items. |
| 1480 | (progn | 1506 | (normal-mouse-startup-screen) |
| 1481 | (insert "\ | ||
| 1482 | You can do basic editing with the menu bar and scroll bar using the mouse. | ||
| 1483 | To quit a partially entered command, type Control-g.\n") | ||
| 1484 | |||
| 1485 | (insert "\nImportant Help menu items:\n") | ||
| 1486 | (insert-button "Emacs Tutorial" | ||
| 1487 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1488 | 'follow-link t) | ||
| 1489 | (insert "\t\tLearn how to use Emacs efficiently\n") | ||
| 1490 | (insert-button "Emacs FAQ" | ||
| 1491 | 'action (lambda (button) (view-emacs-FAQ)) | ||
| 1492 | 'follow-link t) | ||
| 1493 | (insert "\t\tFrequently asked questions and answers\n") | ||
| 1494 | (insert-button "Read the Emacs Manual" | ||
| 1495 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1496 | 'follow-link t) | ||
| 1497 | (insert "\tView the Emacs manual using Info\n") | ||
| 1498 | (insert-button "\(Non)Warranty" | ||
| 1499 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1500 | 'follow-link t) | ||
| 1501 | (insert "\t\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") | ||
| 1502 | (insert-button "Copying Conditions" | ||
| 1503 | 'action (lambda (button) (describe-copying)) | ||
| 1504 | 'follow-link t) | ||
| 1505 | (insert "\tConditions for redistributing and changing Emacs\n") | ||
| 1506 | (insert-button "Getting New Versions" | ||
| 1507 | 'action (lambda (button) (describe-distribution)) | ||
| 1508 | 'follow-link t) | ||
| 1509 | (insert "\tHow to obtain the latest version of Emacs\n") | ||
| 1510 | (insert-button "More Manuals / Ordering Manuals" | ||
| 1511 | 'action (lambda (button) (view-order-manuals)) | ||
| 1512 | 'follow-link t) | ||
| 1513 | (insert " How to order printed manuals from the FSF\n") | ||
| 1514 | |||
| 1515 | (insert "\nUseful tasks:\n") | ||
| 1516 | (insert-button "Visit New File" | ||
| 1517 | 'action (lambda (button) (call-interactively 'find-file)) | ||
| 1518 | 'follow-link t) | ||
| 1519 | (insert "\t\tSpecify a new file's name, to edit the file\n") | ||
| 1520 | (insert-button "Open Home Directory" | ||
| 1521 | 'action (lambda (button) (dired "~")) | ||
| 1522 | 'follow-link t) | ||
| 1523 | (insert "\tOpen your home directory, to operate on its files\n") | ||
| 1524 | (insert-button "Open *scratch* buffer" | ||
| 1525 | 'action (lambda (button) (switch-to-buffer | ||
| 1526 | (get-buffer-create "*scratch*"))) | ||
| 1527 | 'follow-link t) | ||
| 1528 | (insert "\tOpen buffer for notes you don't want to save\n") | ||
| 1529 | (insert-button "Customize Startup" | ||
| 1530 | 'action (lambda (button) (customize-group 'initialization)) | ||
| 1531 | 'follow-link t) | ||
| 1532 | (insert "\tChange initialization settings including this screen\n") | ||
| 1533 | |||
| 1534 | (insert "\n" (emacs-version) | ||
| 1535 | "\n" emacs-copyright)) | ||
| 1536 | 1507 | ||
| 1537 | ;; No mouse menus, so give help using kbd commands. | 1508 | ;; No mouse menus, so give help using kbd commands. |
| 1509 | (normal-no-mouse-startup-screen)) | ||
| 1538 | 1510 | ||
| 1539 | ;; If keys have their default meanings, | 1511 | (normal-about-screen)) |
| 1540 | ;; use precomputed string to save lots of time. | ||
| 1541 | (if (and (eq (key-binding "\C-h") 'help-command) | ||
| 1542 | (eq (key-binding "\C-xu") 'advertised-undo) | ||
| 1543 | (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal) | ||
| 1544 | (eq (key-binding "\C-ht") 'help-with-tutorial) | ||
| 1545 | (eq (key-binding "\C-hi") 'info) | ||
| 1546 | (eq (key-binding "\C-hr") 'info-emacs-manual) | ||
| 1547 | (eq (key-binding "\C-h\C-n") 'view-emacs-news)) | ||
| 1548 | (progn | ||
| 1549 | (insert " | ||
| 1550 | Get help\t C-h (Hold down CTRL and press h) | ||
| 1551 | ") | ||
| 1552 | (insert-button "Emacs manual" | ||
| 1553 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1554 | 'follow-link t) | ||
| 1555 | (insert " C-h r\t") | ||
| 1556 | (insert-button "Browse manuals" | ||
| 1557 | 'action (lambda (button) (Info-directory)) | ||
| 1558 | 'follow-link t) | ||
| 1559 | (insert "\t C-h i | ||
| 1560 | ") | ||
| 1561 | (insert-button "Emacs tutorial" | ||
| 1562 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1563 | 'follow-link t) | ||
| 1564 | (insert " C-h t\tUndo changes\t C-x u | ||
| 1565 | ") | ||
| 1566 | (insert-button "Buy manuals" | ||
| 1567 | 'action (lambda (button) (view-order-manuals)) | ||
| 1568 | 'follow-link t) | ||
| 1569 | (insert "\t C-h C-m\tExit Emacs\t C-x C-c")) | ||
| 1570 | |||
| 1571 | (insert (format " | ||
| 1572 | Get help\t %s | ||
| 1573 | " | ||
| 1574 | (let ((where (where-is-internal | ||
| 1575 | 'help-command nil t))) | ||
| 1576 | (if where | ||
| 1577 | (key-description where) | ||
| 1578 | "M-x help")))) | ||
| 1579 | (insert-button "Emacs manual" | ||
| 1580 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1581 | 'follow-link t) | ||
| 1582 | (insert (substitute-command-keys"\t \\[info-emacs-manual]\t")) | ||
| 1583 | (insert-button "Browse manuals" | ||
| 1584 | 'action (lambda (button) (Info-directory)) | ||
| 1585 | 'follow-link t) | ||
| 1586 | (insert (substitute-command-keys "\t \\[info] | ||
| 1587 | ")) | ||
| 1588 | (insert-button "Emacs tutorial" | ||
| 1589 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1590 | 'follow-link t) | ||
| 1591 | (insert (substitute-command-keys | ||
| 1592 | "\t \\[help-with-tutorial]\tUndo changes\t \\[advertised-undo] | ||
| 1593 | ")) | ||
| 1594 | (insert-button "Buy manuals" | ||
| 1595 | 'action (lambda (button) (view-order-manuals)) | ||
| 1596 | 'follow-link t) | ||
| 1597 | (insert (substitute-command-keys | ||
| 1598 | "\t \\[view-order-manuals]\tExit Emacs\t \\[save-buffers-kill-terminal]"))) | ||
| 1599 | |||
| 1600 | ;; Say how to use the menu bar with the keyboard. | ||
| 1601 | (insert "\n") | ||
| 1602 | (insert-button "Activate menubar" | ||
| 1603 | 'action (lambda (button) (tmm-menubar)) | ||
| 1604 | 'follow-link t) | ||
| 1605 | (if (and (eq (key-binding "\M-`") 'tmm-menubar) | ||
| 1606 | (eq (key-binding [f10]) 'tmm-menubar)) | ||
| 1607 | (insert " F10 or ESC ` or M-`") | ||
| 1608 | (insert (substitute-command-keys " \\[tmm-menubar]"))) | ||
| 1609 | |||
| 1610 | ;; Many users seem to have problems with these. | ||
| 1611 | (insert " | ||
| 1612 | \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. | ||
| 1613 | If you have no Meta key, you may instead type ESC followed by the character.)") | ||
| 1614 | |||
| 1615 | ;; Insert links to useful tasks | ||
| 1616 | (insert "\nUseful tasks:\n") | ||
| 1617 | |||
| 1618 | (insert-button "Visit New File" | ||
| 1619 | 'action (lambda (button) (call-interactively 'find-file)) | ||
| 1620 | 'follow-link t) | ||
| 1621 | (insert "\t\t\t") | ||
| 1622 | (insert-button "Open Home Directory" | ||
| 1623 | 'action (lambda (button) (dired "~")) | ||
| 1624 | 'follow-link t) | ||
| 1625 | (insert "\n") | ||
| 1626 | |||
| 1627 | (insert-button "Customize Startup" | ||
| 1628 | 'action (lambda (button) (customize-group 'initialization)) | ||
| 1629 | 'follow-link t) | ||
| 1630 | (insert "\t\t") | ||
| 1631 | (insert-button "Open *scratch* buffer" | ||
| 1632 | 'action (lambda (button) (switch-to-buffer | ||
| 1633 | (get-buffer-create "*scratch*"))) | ||
| 1634 | 'follow-link t) | ||
| 1635 | (insert "\n") | ||
| 1636 | |||
| 1637 | (insert "\n" (emacs-version) | ||
| 1638 | "\n" emacs-copyright) | ||
| 1639 | |||
| 1640 | (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) | ||
| 1641 | (eq (key-binding "\C-h\C-d") 'describe-distribution) | ||
| 1642 | (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) | ||
| 1643 | (progn | ||
| 1644 | (insert | ||
| 1645 | "\n | ||
| 1646 | GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for ") | ||
| 1647 | (insert-button "full details" | ||
| 1648 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1649 | 'follow-link t) | ||
| 1650 | (insert ". | ||
| 1651 | Emacs is Free Software--Free as in Freedom--so you can redistribute copies | ||
| 1652 | of Emacs and modify it; type C-h C-c to see ") | ||
| 1653 | (insert-button "the conditions" | ||
| 1654 | 'action (lambda (button) (describe-copying)) | ||
| 1655 | 'follow-link t) | ||
| 1656 | (insert ". | ||
| 1657 | Type C-h C-d for information on ") | ||
| 1658 | (insert-button "getting the latest version" | ||
| 1659 | 'action (lambda (button) (describe-distribution)) | ||
| 1660 | 'follow-link t) | ||
| 1661 | (insert ".")) | ||
| 1662 | (insert (substitute-command-keys | ||
| 1663 | "\n | ||
| 1664 | GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for ")) | ||
| 1665 | (insert-button "full details" | ||
| 1666 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1667 | 'follow-link t) | ||
| 1668 | (insert (substitute-command-keys ". | ||
| 1669 | Emacs is Free Software--Free as in Freedom--so you can redistribute copies | ||
| 1670 | of Emacs and modify it; type \\[describe-copying] to see ")) | ||
| 1671 | (insert-button "the conditions" | ||
| 1672 | 'action (lambda (button) (describe-copying)) | ||
| 1673 | 'follow-link t) | ||
| 1674 | (insert (substitute-command-keys". | ||
| 1675 | Type \\[describe-distribution] for information on ")) | ||
| 1676 | (insert-button "getting the latest version" | ||
| 1677 | 'action (lambda (button) (describe-distribution)) | ||
| 1678 | 'follow-link t) | ||
| 1679 | (insert "."))) | ||
| 1680 | |||
| 1681 | ;; About screen | ||
| 1682 | (insert "\n" (emacs-version) "\n" emacs-copyright "\n") | ||
| 1683 | ) | ||
| 1684 | 1512 | ||
| 1685 | ;; The rest of the startup screen is the same on all | 1513 | ;; The rest of the startup screen is the same on all |
| 1686 | ;; kinds of terminals. | 1514 | ;; kinds of terminals. |
| @@ -1715,6 +1543,224 @@ Type \\[describe-distribution] for information on ")) | |||
| 1715 | (if startup (rename-buffer "*GNU Emacs*" t)) | 1543 | (if startup (rename-buffer "*GNU Emacs*" t)) |
| 1716 | (goto-char (point-min))))) | 1544 | (goto-char (point-min))))) |
| 1717 | 1545 | ||
| 1546 | (defun normal-mouse-startup-screen () | ||
| 1547 | ;; The user can use the mouse to activate menus | ||
| 1548 | ;; so give help in terms of menu items. | ||
| 1549 | (insert "\ | ||
| 1550 | You can do basic editing with the menu bar and scroll bar using the mouse. | ||
| 1551 | To quit a partially entered command, type Control-g.\n") | ||
| 1552 | |||
| 1553 | (insert "\nImportant Help menu items:\n") | ||
| 1554 | (insert-button "Emacs Tutorial" | ||
| 1555 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1556 | 'follow-link t) | ||
| 1557 | (insert "\t\tLearn basic Emacs keystroke commands\n") | ||
| 1558 | (insert-button "Read the Emacs Manual" | ||
| 1559 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1560 | 'follow-link t) | ||
| 1561 | (insert "\tView the Emacs manual using Info\n") | ||
| 1562 | (insert-button "\(Non)Warranty" | ||
| 1563 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1564 | 'follow-link t) | ||
| 1565 | (insert "\t\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") | ||
| 1566 | (insert-button "Copying Conditions" | ||
| 1567 | 'action (lambda (button) (describe-copying)) | ||
| 1568 | 'follow-link t) | ||
| 1569 | (insert "\tConditions for redistributing and changing Emacs\n") | ||
| 1570 | (insert-button "More Manuals / Ordering Manuals" | ||
| 1571 | 'action (lambda (button) (view-order-manuals)) | ||
| 1572 | 'follow-link t) | ||
| 1573 | (insert " How to order printed manuals from the FSF\n") | ||
| 1574 | |||
| 1575 | (insert "\nUseful tasks:\n") | ||
| 1576 | (insert-button "Visit New File" | ||
| 1577 | 'action (lambda (button) (call-interactively 'find-file)) | ||
| 1578 | 'follow-link t) | ||
| 1579 | (insert "\t\tSpecify a new file's name, to edit the file\n") | ||
| 1580 | (insert-button "Open Home Directory" | ||
| 1581 | 'action (lambda (button) (dired "~")) | ||
| 1582 | 'follow-link t) | ||
| 1583 | (insert "\tOpen your home directory, to operate on its files\n") | ||
| 1584 | (insert-button "Customize Startup" | ||
| 1585 | 'action (lambda (button) (customize-group 'initialization)) | ||
| 1586 | 'follow-link t) | ||
| 1587 | (insert "\tChange initialization settings including this screen\n") | ||
| 1588 | |||
| 1589 | (insert "\n" (emacs-version) | ||
| 1590 | "\n" emacs-copyright)) | ||
| 1591 | |||
| 1592 | ;; No mouse menus, so give help using kbd commands. | ||
| 1593 | (defun normal-no-mouse-startup-screen () | ||
| 1594 | |||
| 1595 | ;; If keys have their default meanings, | ||
| 1596 | ;; use precomputed string to save lots of time. | ||
| 1597 | (if (and (eq (key-binding "\C-h") 'help-command) | ||
| 1598 | (eq (key-binding "\C-xu") 'advertised-undo) | ||
| 1599 | (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal) | ||
| 1600 | (eq (key-binding "\C-ht") 'help-with-tutorial) | ||
| 1601 | (eq (key-binding "\C-hi") 'info) | ||
| 1602 | (eq (key-binding "\C-hr") 'info-emacs-manual) | ||
| 1603 | (eq (key-binding "\C-h\C-n") 'view-emacs-news)) | ||
| 1604 | (progn | ||
| 1605 | (insert " | ||
| 1606 | Get help\t C-h (Hold down CTRL and press h) | ||
| 1607 | ") | ||
| 1608 | (insert-button "Emacs manual" | ||
| 1609 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1610 | 'follow-link t) | ||
| 1611 | (insert " C-h r\t") | ||
| 1612 | (insert-button "Browse manuals" | ||
| 1613 | 'action (lambda (button) (Info-directory)) | ||
| 1614 | 'follow-link t) | ||
| 1615 | (insert "\t C-h i | ||
| 1616 | ") | ||
| 1617 | (insert-button "Emacs tutorial" | ||
| 1618 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1619 | 'follow-link t) | ||
| 1620 | (insert " C-h t\tUndo changes\t C-x u | ||
| 1621 | ") | ||
| 1622 | (insert-button "Buy manuals" | ||
| 1623 | 'action (lambda (button) (view-order-manuals)) | ||
| 1624 | 'follow-link t) | ||
| 1625 | (insert "\t C-h C-m\tExit Emacs\t C-x C-c")) | ||
| 1626 | |||
| 1627 | (insert (format " | ||
| 1628 | Get help\t %s | ||
| 1629 | " | ||
| 1630 | (let ((where (where-is-internal | ||
| 1631 | 'help-command nil t))) | ||
| 1632 | (if where | ||
| 1633 | (key-description where) | ||
| 1634 | "M-x help")))) | ||
| 1635 | (insert-button "Emacs manual" | ||
| 1636 | 'action (lambda (button) (info-emacs-manual)) | ||
| 1637 | 'follow-link t) | ||
| 1638 | (insert (substitute-command-keys"\t \\[info-emacs-manual]\t")) | ||
| 1639 | (insert-button "Browse manuals" | ||
| 1640 | 'action (lambda (button) (Info-directory)) | ||
| 1641 | 'follow-link t) | ||
| 1642 | (insert (substitute-command-keys "\t \\[info] | ||
| 1643 | ")) | ||
| 1644 | (insert-button "Emacs tutorial" | ||
| 1645 | 'action (lambda (button) (help-with-tutorial)) | ||
| 1646 | 'follow-link t) | ||
| 1647 | (insert (substitute-command-keys | ||
| 1648 | "\t \\[help-with-tutorial]\tUndo changes\t \\[advertised-undo] | ||
| 1649 | ")) | ||
| 1650 | (insert-button "Buy manuals" | ||
| 1651 | 'action (lambda (button) (view-order-manuals)) | ||
| 1652 | 'follow-link t) | ||
| 1653 | (insert (substitute-command-keys | ||
| 1654 | "\t \\[view-order-manuals]\tExit Emacs\t \\[save-buffers-kill-terminal]"))) | ||
| 1655 | |||
| 1656 | ;; Say how to use the menu bar with the keyboard. | ||
| 1657 | (insert "\n") | ||
| 1658 | (insert-button "Activate menubar" | ||
| 1659 | 'action (lambda (button) (tmm-menubar)) | ||
| 1660 | 'follow-link t) | ||
| 1661 | (if (and (eq (key-binding "\M-`") 'tmm-menubar) | ||
| 1662 | (eq (key-binding [f10]) 'tmm-menubar)) | ||
| 1663 | (insert " F10 or ESC ` or M-`") | ||
| 1664 | (insert (substitute-command-keys " \\[tmm-menubar]"))) | ||
| 1665 | |||
| 1666 | ;; Many users seem to have problems with these. | ||
| 1667 | (insert " | ||
| 1668 | \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. | ||
| 1669 | If you have no Meta key, you may instead type ESC followed by the character.)") | ||
| 1670 | |||
| 1671 | ;; Insert links to useful tasks | ||
| 1672 | (insert "\nUseful tasks:\n") | ||
| 1673 | |||
| 1674 | (insert-button "Visit New File" | ||
| 1675 | 'action (lambda (button) (call-interactively 'find-file)) | ||
| 1676 | 'follow-link t) | ||
| 1677 | (insert "\t\t\t") | ||
| 1678 | (insert-button "Open Home Directory" | ||
| 1679 | 'action (lambda (button) (dired "~")) | ||
| 1680 | 'follow-link t) | ||
| 1681 | (insert "\n") | ||
| 1682 | |||
| 1683 | (insert-button "Customize Startup" | ||
| 1684 | 'action (lambda (button) (customize-group 'initialization)) | ||
| 1685 | 'follow-link t) | ||
| 1686 | (insert "\t\t") | ||
| 1687 | (insert-button "Open *scratch* buffer" | ||
| 1688 | 'action (lambda (button) (switch-to-buffer | ||
| 1689 | (get-buffer-create "*scratch*"))) | ||
| 1690 | 'follow-link t) | ||
| 1691 | (insert "\n") | ||
| 1692 | (insert "\n" (emacs-version) "\n" emacs-copyright "\n") | ||
| 1693 | |||
| 1694 | (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) | ||
| 1695 | (eq (key-binding "\C-h\C-d") 'describe-distribution) | ||
| 1696 | (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) | ||
| 1697 | (progn | ||
| 1698 | (insert | ||
| 1699 | "\n | ||
| 1700 | GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for ") | ||
| 1701 | (insert-button "full details" | ||
| 1702 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1703 | 'follow-link t) | ||
| 1704 | (insert ". | ||
| 1705 | Emacs is Free Software--Free as in Freedom--so you can redistribute copies | ||
| 1706 | of Emacs and modify it; type C-h C-c to see ") | ||
| 1707 | (insert-button "the conditions" | ||
| 1708 | 'action (lambda (button) (describe-copying)) | ||
| 1709 | 'follow-link t) | ||
| 1710 | (insert ". | ||
| 1711 | Type C-h C-d for information on ") | ||
| 1712 | (insert-button "getting the latest version" | ||
| 1713 | 'action (lambda (button) (describe-distribution)) | ||
| 1714 | 'follow-link t) | ||
| 1715 | (insert ".")) | ||
| 1716 | (insert (substitute-command-keys | ||
| 1717 | "\n | ||
| 1718 | GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for ")) | ||
| 1719 | (insert-button "full details" | ||
| 1720 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1721 | 'follow-link t) | ||
| 1722 | (insert (substitute-command-keys ". | ||
| 1723 | Emacs is Free Software--Free as in Freedom--so you can redistribute copies | ||
| 1724 | of Emacs and modify it; type \\[describe-copying] to see ")) | ||
| 1725 | (insert-button "the conditions" | ||
| 1726 | 'action (lambda (button) (describe-copying)) | ||
| 1727 | 'follow-link t) | ||
| 1728 | (insert (substitute-command-keys". | ||
| 1729 | Type \\[describe-distribution] for information on ")) | ||
| 1730 | (insert-button "getting the latest version" | ||
| 1731 | 'action (lambda (button) (describe-distribution)) | ||
| 1732 | 'follow-link t) | ||
| 1733 | (insert "."))) | ||
| 1734 | |||
| 1735 | (defun normal-about-screen () | ||
| 1736 | (insert "\n" (emacs-version) "\n" emacs-copyright "\n\n") | ||
| 1737 | |||
| 1738 | (insert "To follow a link, click Mouse-1 on it, or move to it and type RET.\n\n") | ||
| 1739 | |||
| 1740 | (insert-button "GNU and Freedom" | ||
| 1741 | 'action (lambda (button) (describe-project)) | ||
| 1742 | 'follow-link t) | ||
| 1743 | (insert "\t\tWhy we developed GNU Emacs and the GNU system\n") | ||
| 1744 | |||
| 1745 | (insert-button "Absence of Warranty" | ||
| 1746 | 'action (lambda (button) (describe-no-warranty)) | ||
| 1747 | 'follow-link t) | ||
| 1748 | (insert "\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") | ||
| 1749 | |||
| 1750 | (insert-button "Copying Conditions" | ||
| 1751 | 'action (lambda (button) (describe-copying)) | ||
| 1752 | 'follow-link t) | ||
| 1753 | (insert "\tConditions for redistributing and changing Emacs\n") | ||
| 1754 | |||
| 1755 | (insert-button "Getting New Versions" | ||
| 1756 | 'action (lambda (button) (describe-distribution)) | ||
| 1757 | 'follow-link t) | ||
| 1758 | (insert "\tHow to get the latest version of GNU Emacs\n") | ||
| 1759 | |||
| 1760 | (insert-button "More Manuals / Ordering Manuals" | ||
| 1761 | 'action (lambda (button) (view-order-manuals)) | ||
| 1762 | 'follow-link t) | ||
| 1763 | (insert "\tBuying printed manuals from the FSF\n")) | ||
| 1718 | 1764 | ||
| 1719 | (defun startup-echo-area-message () | 1765 | (defun startup-echo-area-message () |
| 1720 | (if (eq (key-binding "\C-h\C-p") 'describe-project) | 1766 | (if (eq (key-binding "\C-h\C-p") 'describe-project) |