diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/startup.el | 111 |
2 files changed, 67 insertions, 51 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1957ddd8a76..8172b60ba7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2001-12-16 Richard M. Stallman <rms@gnu.org> | 1 | 2001-12-16 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * startup.el (command-line-1): Display startup screen | ||
| 4 | even if there are command line args. | ||
| 5 | Add a note about how to go to editing your files. | ||
| 6 | (fancy-splash-head): Add a note about how to go to your files. | ||
| 7 | (fancy-splash-outer-buffer): New variable. | ||
| 8 | (fancy-splash-screens): Bind variable fancy-splash-outer-buffer. | ||
| 9 | |||
| 3 | * subr.el (with-temp-message): At the end, always discard | 10 | * subr.el (with-temp-message): At the end, always discard |
| 4 | the temp message, even by clearing the echo area. | 11 | the temp message, even by clearing the echo area. |
| 5 | 12 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index e62665bd560..f9b2c2633d1 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1089,7 +1089,7 @@ Values less than 60 seconds are ignored." | |||
| 1089 | (defvar fancy-current-text nil) | 1089 | (defvar fancy-current-text nil) |
| 1090 | (defvar fancy-splash-help-echo nil) | 1090 | (defvar fancy-splash-help-echo nil) |
| 1091 | (defvar fancy-splash-stop-time nil) | 1091 | (defvar fancy-splash-stop-time nil) |
| 1092 | 1092 | (defvar fancy-splash-outer-buffer nil) | |
| 1093 | 1093 | ||
| 1094 | (defun fancy-splash-insert (&rest args) | 1094 | (defun fancy-splash-insert (&rest args) |
| 1095 | "Insert text into the current buffer, with faces. | 1095 | "Insert text into the current buffer, with faces. |
| @@ -1152,7 +1152,11 @@ where FACE is a valid face specification, as it can be used with | |||
| 1152 | (fancy-splash-insert | 1152 | (fancy-splash-insert |
| 1153 | :face '(variable-pitch :foreground "red") | 1153 | :face '(variable-pitch :foreground "red") |
| 1154 | "GNU Emacs is one component of the GNU operating system.")) | 1154 | "GNU Emacs is one component of the GNU operating system.")) |
| 1155 | (insert "\n")) | 1155 | (insert "\n") |
| 1156 | (unless (equal (buffer-name fancy-splash-outer-buffer) "*scratch*") | ||
| 1157 | (fancy-splash-insert :face 'variable-pitch | ||
| 1158 | (substitute-command-keys | ||
| 1159 | "Type \\[recenter] to begin editing your file.\n")))) | ||
| 1156 | 1160 | ||
| 1157 | 1161 | ||
| 1158 | (defun fancy-splash-tail () | 1162 | (defun fancy-splash-tail () |
| @@ -1213,12 +1217,14 @@ where FACE is a valid face specification, as it can be used with | |||
| 1213 | (defun fancy-splash-screens () | 1217 | (defun fancy-splash-screens () |
| 1214 | "Display fancy splash screens when Emacs starts." | 1218 | "Display fancy splash screens when Emacs starts." |
| 1215 | (setq fancy-splash-help-echo (startup-echo-area-message)) | 1219 | (setq fancy-splash-help-echo (startup-echo-area-message)) |
| 1216 | (switch-to-buffer "GNU Emacs") | ||
| 1217 | (setq tab-width 20) | 1220 | (setq tab-width 20) |
| 1218 | (let ((old-hourglass display-hourglass) | 1221 | (let ((old-hourglass display-hourglass) |
| 1219 | (splash-buffer (current-buffer)) | 1222 | (fancy-splash-outer-buffer (current-buffer)) |
| 1223 | splash-buffer | ||
| 1220 | (old-minor-mode-map-alist minor-mode-map-alist) | 1224 | (old-minor-mode-map-alist minor-mode-map-alist) |
| 1221 | timer) | 1225 | timer) |
| 1226 | (switch-to-buffer "GNU Emacs") | ||
| 1227 | (setq splash-buffer (current-buffer)) | ||
| 1222 | (catch 'stop-splashing | 1228 | (catch 'stop-splashing |
| 1223 | (unwind-protect | 1229 | (unwind-protect |
| 1224 | (let ((map (make-sparse-keymap))) | 1230 | (let ((map (make-sparse-keymap))) |
| @@ -1494,57 +1500,56 @@ where FACE is a valid face specification, as it can be used with | |||
| 1494 | (not noninteractive) | 1500 | (not noninteractive) |
| 1495 | (not inhibit-startup-buffer-menu) | 1501 | (not inhibit-startup-buffer-menu) |
| 1496 | (or (get-buffer-window first-file-buffer) | 1502 | (or (get-buffer-window first-file-buffer) |
| 1497 | (list-buffers)))) | 1503 | (list-buffers))))) |
| 1504 | |||
| 1505 | ;; Maybe display a startup screen. | ||
| 1506 | (when (and (not inhibit-startup-message) (not noninteractive) | ||
| 1507 | ;; Don't display startup screen if init file | ||
| 1508 | ;; has started some sort of server. | ||
| 1509 | (not (and (fboundp 'process-list) | ||
| 1510 | (process-list)))) | ||
| 1511 | ;; Display a startup screen, after some preparations. | ||
| 1512 | |||
| 1513 | ;; If there are no switches to process, we might as well | ||
| 1514 | ;; run this hook now, and there may be some need to do it | ||
| 1515 | ;; before doing any output. | ||
| 1516 | (and term-setup-hook | ||
| 1517 | (run-hooks 'term-setup-hook)) | ||
| 1518 | ;; Don't let the hook be run twice. | ||
| 1519 | (setq term-setup-hook nil) | ||
| 1520 | |||
| 1521 | ;; It's important to notice the user settings before we | ||
| 1522 | ;; display the startup message; otherwise, the settings | ||
| 1523 | ;; won't take effect until the user gives the first | ||
| 1524 | ;; keystroke, and that's distracting. | ||
| 1525 | (when (fboundp 'frame-notice-user-settings) | ||
| 1526 | (frame-notice-user-settings)) | ||
| 1527 | |||
| 1528 | ;; If there are no switches to process, we might as well | ||
| 1529 | ;; run this hook now, and there may be some need to do it | ||
| 1530 | ;; before doing any output. | ||
| 1531 | (when window-setup-hook | ||
| 1532 | (run-hooks 'window-setup-hook) | ||
| 1533 | ;; Don't let the hook be run twice. | ||
| 1534 | (setq window-setup-hook nil)) | ||
| 1535 | |||
| 1536 | ;; Do this now to avoid an annoying delay if the user | ||
| 1537 | ;; clicks the menu bar during the sit-for. | ||
| 1538 | (when (display-popup-menus-p) | ||
| 1539 | (precompute-menubar-bindings)) | ||
| 1540 | (setq menubar-bindings-done t) | ||
| 1498 | 1541 | ||
| 1499 | ;; No command args: maybe display a startup screen. | 1542 | ;; If *scratch* is selected and it is empty, insert an |
| 1500 | (when (and (not inhibit-startup-message) (not noninteractive) | 1543 | ;; initial message saying not to create a file there. |
| 1501 | ;; Don't display startup screen if init file | 1544 | (when (and initial-scratch-message |
| 1502 | ;; has selected another buffer. | ||
| 1503 | (string= (buffer-name) "*scratch*") | 1545 | (string= (buffer-name) "*scratch*") |
| 1504 | ;; Don't display startup screen if init file | ||
| 1505 | ;; has started some sort of server. | ||
| 1506 | (not (and (fboundp 'process-list) | ||
| 1507 | (process-list))) | ||
| 1508 | ;; Don't display startup screen if init file | ||
| 1509 | ;; has inserted some text in *scratch*. | ||
| 1510 | (= 0 (buffer-size))) | 1546 | (= 0 (buffer-size))) |
| 1511 | ;; Display a startup screen, after some preparations. | 1547 | (insert initial-scratch-message) |
| 1548 | (set-buffer-modified-p nil)) | ||
| 1512 | 1549 | ||
| 1513 | ;; If there are no switches to process, we might as well | 1550 | ;; If user typed input during all that work, |
| 1514 | ;; run this hook now, and there may be some need to do it | 1551 | ;; abort the startup screen. Otherwise, display it now. |
| 1515 | ;; before doing any output. | 1552 | (let ((buffer (current-buffer))) |
| 1516 | (and term-setup-hook | ||
| 1517 | (run-hooks 'term-setup-hook)) | ||
| 1518 | ;; Don't let the hook be run twice. | ||
| 1519 | (setq term-setup-hook nil) | ||
| 1520 | |||
| 1521 | ;; It's important to notice the user settings before we | ||
| 1522 | ;; display the startup message; otherwise, the settings | ||
| 1523 | ;; won't take effect until the user gives the first | ||
| 1524 | ;; keystroke, and that's distracting. | ||
| 1525 | (when (fboundp 'frame-notice-user-settings) | ||
| 1526 | (frame-notice-user-settings)) | ||
| 1527 | |||
| 1528 | ;; If there are no switches to process, we might as well | ||
| 1529 | ;; run this hook now, and there may be some need to do it | ||
| 1530 | ;; before doing any output. | ||
| 1531 | (when window-setup-hook | ||
| 1532 | (run-hooks 'window-setup-hook) | ||
| 1533 | ;; Don't let the hook be run twice. | ||
| 1534 | (setq window-setup-hook nil)) | ||
| 1535 | |||
| 1536 | ;; Do this now to avoid an annoying delay if the user | ||
| 1537 | ;; clicks the menu bar during the sit-for. | ||
| 1538 | (when (display-popup-menus-p) | ||
| 1539 | (precompute-menubar-bindings)) | ||
| 1540 | (setq menubar-bindings-done t) | ||
| 1541 | |||
| 1542 | (when initial-scratch-message | ||
| 1543 | (insert initial-scratch-message)) | ||
| 1544 | (set-buffer-modified-p nil) | ||
| 1545 | |||
| 1546 | ;; If user typed input during all that work, | ||
| 1547 | ;; abort the startup screen. Otherwise, display it now. | ||
| 1548 | (when (not (input-pending-p)) | 1553 | (when (not (input-pending-p)) |
| 1549 | (if (and (display-graphic-p) | 1554 | (if (and (display-graphic-p) |
| 1550 | (use-fancy-splash-screens-p)) | 1555 | (use-fancy-splash-screens-p)) |
| @@ -1562,6 +1567,10 @@ where FACE is a valid face specification, as it can be used with | |||
| 1562 | (insert ", one component of a Linux-based GNU system.")) | 1567 | (insert ", one component of a Linux-based GNU system.")) |
| 1563 | (insert "\n") | 1568 | (insert "\n") |
| 1564 | 1569 | ||
| 1570 | (unless (equal (buffer-name buffer) "*scratch*") | ||
| 1571 | (insert (substitute-command-keys | ||
| 1572 | "\nType \\[recenter] to begin editing your file.\n"))) | ||
| 1573 | |||
| 1565 | (if (display-mouse-p) | 1574 | (if (display-mouse-p) |
| 1566 | ;; The user can use the mouse to activate menus | 1575 | ;; The user can use the mouse to activate menus |
| 1567 | ;; so give help in terms of menu items. | 1576 | ;; so give help in terms of menu items. |