comparison lisp/startup.el @ 92318:56a08ddcbc99

(normal-splash-screen): Add argument `concise'. Remove unused binding `prev-buffer'. Let-bind `splash-buffer' to the created buffer. If `concise' is non-nil, call `display-buffer', otherwise `switch-to-buffer'. Doc fix. (display-startup-screen): Add argument `concise' to the call to `normal-splash-screen'.
author Juri Linkov <juri@jurta.org>
date Thu, 28 Feb 2008 23:31:31 +0000
parents ea0789926e6d
children 1faa9403a7f5
comparison
equal deleted inserted replaced
92317:6cd1c02e3b83 92318:56a08ddcbc99
1585 ;; splash screen to be used. 1585 ;; splash screen to be used.
1586 (frame-height (1- (frame-height frame)))) 1586 (frame-height (1- (frame-height frame))))
1587 (> frame-height (+ image-height 19))))))) 1587 (> frame-height (+ image-height 19)))))))
1588 1588
1589 1589
1590 (defun normal-splash-screen (&optional startup) 1590 (defun normal-splash-screen (&optional startup concise)
1591 "Display non-graphic splash screen. 1591 "Display non-graphic splash screen.
1592 If optional argument STARTUP is non-nil, display the startup screen 1592 If optional argument STARTUP is non-nil, display the startup screen
1593 after Emacs starts. If STARTUP is nil, display the About screen." 1593 after Emacs starts. If STARTUP is nil, display the About screen.
1594 (let ((prev-buffer (current-buffer))) 1594 If CONCISE is non-nil, display a concise version of the
1595 (with-current-buffer (get-buffer-create "*About GNU Emacs*") 1595 splash screen in another window."
1596 (let ((splash-buffer (get-buffer-create "*About GNU Emacs*")))
1597 (with-current-buffer splash-buffer
1596 (setq buffer-read-only nil) 1598 (setq buffer-read-only nil)
1597 (erase-buffer) 1599 (erase-buffer)
1598 (setq default-directory command-line-default-directory) 1600 (setq default-directory command-line-default-directory)
1599 (set (make-local-variable 'tab-width) 8) 1601 (set (make-local-variable 'tab-width) 8)
1600 (if (not startup) 1602 (if (not startup)
1651 ;; Display the input that we set up in the buffer. 1653 ;; Display the input that we set up in the buffer.
1652 (set-buffer-modified-p nil) 1654 (set-buffer-modified-p nil)
1653 (setq buffer-read-only t) 1655 (setq buffer-read-only t)
1654 (if (and view-read-only (not view-mode)) 1656 (if (and view-read-only (not view-mode))
1655 (view-mode-enter nil 'kill-buffer)) 1657 (view-mode-enter nil 'kill-buffer))
1656 (switch-to-buffer "*About GNU Emacs*")
1657 (if startup (rename-buffer "*GNU Emacs*" t)) 1658 (if startup (rename-buffer "*GNU Emacs*" t))
1658 (goto-char (point-min))))) 1659 (goto-char (point-min)))
1660 (if concise
1661 (display-buffer splash-buffer)
1662 (switch-to-buffer splash-buffer))))
1659 1663
1660 (defun normal-mouse-startup-screen () 1664 (defun normal-mouse-startup-screen ()
1661 ;; The user can use the mouse to activate menus 1665 ;; The user can use the mouse to activate menus
1662 ;; so give help in terms of menu items. 1666 ;; so give help in terms of menu items.
1663 (insert "\ 1667 (insert "\
1941 screen." 1945 screen."
1942 ;; Prevent recursive calls from server-process-filter. 1946 ;; Prevent recursive calls from server-process-filter.
1943 (if (not (get-buffer "*GNU Emacs*")) 1947 (if (not (get-buffer "*GNU Emacs*"))
1944 (if (use-fancy-splash-screens-p) 1948 (if (use-fancy-splash-screens-p)
1945 (fancy-startup-screen concise) 1949 (fancy-startup-screen concise)
1946 (normal-splash-screen t)))) 1950 (normal-splash-screen t concise))))
1947 1951
1948 (defun display-about-screen () 1952 (defun display-about-screen ()
1949 "Display the *About GNU Emacs* buffer. 1953 "Display the *About GNU Emacs* buffer.
1950 A fancy display is used on graphic displays, normal otherwise." 1954 A fancy display is used on graphic displays, normal otherwise."
1951 (interactive) 1955 (interactive)