comparison lisp/startup.el @ 41496:9c8e073f49db

(command-line-1): Don't do startup screen if a subprocess is running. Call the startup screen buffer "GNU Emacs". Make a special mode-line-format for it.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Nov 2001 17:43:04 +0000
parents 8ea2b10d5a82
children b04f0b4fdbd6
comparison
equal deleted inserted replaced
41495:0bac781ea0d6 41496:9c8e073f49db
1500 (when (and (not inhibit-startup-message) (not noninteractive) 1500 (when (and (not inhibit-startup-message) (not noninteractive)
1501 ;; Don't display startup screen if init file 1501 ;; Don't display startup screen if init file
1502 ;; has selected another buffer. 1502 ;; has selected another buffer.
1503 (string= (buffer-name) "*scratch*") 1503 (string= (buffer-name) "*scratch*")
1504 ;; Don't display startup screen if init file 1504 ;; Don't display startup screen if init file
1505 ;; has started some sort of server.
1506 (process-list)
1507 ;; Don't display startup screen if init file
1505 ;; has inserted some text in *scratch*. 1508 ;; has inserted some text in *scratch*.
1506 (= 0 (buffer-size))) 1509 (= 0 (buffer-size)))
1507 ;; Display a startup screen, after some preparations. 1510 ;; Display a startup screen, after some preparations.
1508 1511
1509 ;; If there are no switches to process, we might as well 1512 ;; If there are no switches to process, we might as well
1540 (set-buffer-modified-p nil) 1543 (set-buffer-modified-p nil)
1541 1544
1542 ;; If user typed input during all that work, 1545 ;; If user typed input during all that work,
1543 ;; abort the startup screen. Otherwise, display it now. 1546 ;; abort the startup screen. Otherwise, display it now.
1544 (when (not (input-pending-p)) 1547 (when (not (input-pending-p))
1545 (with-temp-buffer 1548 (with-current-buffer (get-buffer-create "GNU Emacs")
1546 (if (and (display-graphic-p) 1549 (if (and (display-graphic-p)
1547 (use-fancy-splash-screens-p)) 1550 (use-fancy-splash-screens-p))
1548 (fancy-splash-screens) 1551 (fancy-splash-screens)
1549 (let ((tab-width 8)) 1552 (let ((tab-width 8)
1553 (mode-line-format (propertize "---- %b %-"
1554 'face '(:weight bold))))
1555
1550 ;; The convention for this piece of code is that 1556 ;; The convention for this piece of code is that
1551 ;; each piece of output starts with one or two newlines 1557 ;; each piece of output starts with one or two newlines
1552 ;; and does not end with any newlines. 1558 ;; and does not end with any newlines.
1553 (insert "Welcome to GNU Emacs") 1559 (insert "Welcome to GNU Emacs")
1554 (if (eq system-type 'gnu/linux) 1560 (if (eq system-type 'gnu/linux)
1664 ;; Display the input that we set up in the buffer. 1670 ;; Display the input that we set up in the buffer.
1665 (set-buffer-modified-p nil) 1671 (set-buffer-modified-p nil)
1666 (goto-char (point-min)) 1672 (goto-char (point-min))
1667 (save-window-excursion 1673 (save-window-excursion
1668 (switch-to-buffer (current-buffer)) 1674 (switch-to-buffer (current-buffer))
1669 (sit-for 120))))))))) 1675 (sit-for 120)))))
1676 (kill-buffer "GNU Emacs")))))
1670 1677
1671 1678
1672 (defun command-line-normalize-file-name (file) 1679 (defun command-line-normalize-file-name (file)
1673 "Collapse multiple slashes to one, to handle non-Emacs file names." 1680 "Collapse multiple slashes to one, to handle non-Emacs file names."
1674 (save-match-data 1681 (save-match-data