/[emacs]/emacs/lisp/startup.el
ViewVC logotype

Diff of /emacs/lisp/startup.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.279 by rms, Mon Nov 26 20:15:26 2001 UTC revision 1.280 by rms, Sun Dec 16 18:27:51 2001 UTC
# Line 1089  Values less than 60 seconds are ignored. Line 1089  Values less than 60 seconds are ignored.
1089  (defvar fancy-current-text nil)  (defvar fancy-current-text nil)
1090  (defvar fancy-splash-help-echo nil)  (defvar fancy-splash-help-echo nil)
1091  (defvar fancy-splash-stop-time nil)  (defvar fancy-splash-stop-time nil)
1092    (defvar fancy-splash-outer-buffer nil)
1093    
1094  (defun fancy-splash-insert (&rest args)  (defun fancy-splash-insert (&rest args)
1095    "Insert text into the current buffer, with faces.    "Insert text into the current buffer, with faces.
# Line 1152  where FACE is a valid face specification Line 1152  where FACE is a valid face specification
1152      (fancy-splash-insert      (fancy-splash-insert
1153       :face '(variable-pitch :foreground "red")       :face '(variable-pitch :foreground "red")
1154       "GNU Emacs is one component of the GNU operating system."))       "GNU Emacs is one component of the GNU operating system."))
1155    (insert "\n"))    (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"))))
1160    
1161    
1162  (defun fancy-splash-tail ()  (defun fancy-splash-tail ()
# Line 1213  where FACE is a valid face specification Line 1217  where FACE is a valid face specification
1217  (defun fancy-splash-screens ()  (defun fancy-splash-screens ()
1218    "Display fancy splash screens when Emacs starts."    "Display fancy splash screens when Emacs starts."
1219    (setq fancy-splash-help-echo (startup-echo-area-message))    (setq fancy-splash-help-echo (startup-echo-area-message))
   (switch-to-buffer "GNU Emacs")  
1220    (setq tab-width 20)    (setq tab-width 20)
1221    (let ((old-hourglass display-hourglass)    (let ((old-hourglass display-hourglass)
1222          (splash-buffer (current-buffer))          (fancy-splash-outer-buffer (current-buffer))
1223            splash-buffer
1224          (old-minor-mode-map-alist minor-mode-map-alist)          (old-minor-mode-map-alist minor-mode-map-alist)
1225          timer)          timer)
1226        (switch-to-buffer "GNU Emacs")
1227        (setq splash-buffer (current-buffer))
1228      (catch 'stop-splashing      (catch 'stop-splashing
1229        (unwind-protect        (unwind-protect
1230            (let ((map (make-sparse-keymap)))            (let ((map (make-sparse-keymap)))
# Line 1494  where FACE is a valid face specification Line 1500  where FACE is a valid face specification
1500               (not noninteractive)               (not noninteractive)
1501               (not inhibit-startup-buffer-menu)               (not inhibit-startup-buffer-menu)
1502               (or (get-buffer-window first-file-buffer)               (or (get-buffer-window first-file-buffer)
1503                   (list-buffers))))                   (list-buffers)))))
   
     ;; No command args: maybe display a startup screen.  
     (when (and (not inhibit-startup-message) (not noninteractive)  
                ;; Don't display startup screen if init file  
                ;; has selected another buffer.  
                (string= (buffer-name) "*scratch*")  
                ;; Don't display startup screen if init file  
                ;; has started some sort of server.  
                (not (and (fboundp 'process-list)  
                          (process-list)))  
                ;; Don't display startup screen if init file  
                ;; has inserted some text in *scratch*.  
                (= 0 (buffer-size)))  
       ;; Display a startup screen, after some preparations.  
1504    
1505        ;; If there are no switches to process, we might as well    ;; Maybe display a startup screen.
1506        ;; run this hook now, and there may be some need to do it    (when (and (not inhibit-startup-message) (not noninteractive)
1507        ;; before doing any output.               ;; Don't display startup screen if init file
1508        (and term-setup-hook               ;; has started some sort of server.
1509             (run-hooks 'term-setup-hook))               (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.        ;; Don't let the hook be run twice.
1534        (setq term-setup-hook nil)        (setq window-setup-hook nil))
1535    
1536        ;; It's important to notice the user settings before we      ;; Do this now to avoid an annoying delay if the user
1537        ;; display the startup message; otherwise, the settings      ;; clicks the menu bar during the sit-for.
1538        ;; won't take effect until the user gives the first      (when (display-popup-menus-p)
1539        ;; keystroke, and that's distracting.        (precompute-menubar-bindings))
1540        (when (fboundp 'frame-notice-user-settings)      (setq menubar-bindings-done t)
1541          (frame-notice-user-settings))  
1542        ;; If *scratch* is selected and it is empty, insert an
1543        ;; If there are no switches to process, we might as well      ;; initial message saying not to create a file there.
1544        ;; run this hook now, and there may be some need to do it      (when (and initial-scratch-message
1545        ;; before doing any output.                 (string= (buffer-name) "*scratch*")
1546        (when window-setup-hook                 (= 0 (buffer-size)))
1547          (run-hooks 'window-setup-hook)        (insert initial-scratch-message)
1548          ;; Don't let the hook be run twice.        (set-buffer-modified-p nil))
         (setq window-setup-hook nil))  
   
       ;; Do this now to avoid an annoying delay if the user  
       ;; clicks the menu bar during the sit-for.  
       (when (display-popup-menus-p)  
         (precompute-menubar-bindings))  
       (setq menubar-bindings-done t)  
   
       (when initial-scratch-message  
         (insert initial-scratch-message))  
       (set-buffer-modified-p nil)  
1549    
1550        ;; If user typed input during all that work,      ;; If user typed input during all that work,
1551        ;; abort the startup screen.  Otherwise, display it now.      ;; abort the startup screen.  Otherwise, display it now.
1552        (let ((buffer (current-buffer)))
1553        (when (not (input-pending-p))        (when (not (input-pending-p))
1554          (if (and (display-graphic-p)          (if (and (display-graphic-p)
1555                   (use-fancy-splash-screens-p))                   (use-fancy-splash-screens-p))
# Line 1562  where FACE is a valid face specification Line 1567  where FACE is a valid face specification
1567                    (insert ", one component of a Linux-based GNU system."))                    (insert ", one component of a Linux-based GNU system."))
1568                (insert "\n")                (insert "\n")
1569    
1570                  (unless (equal (buffer-name buffer) "*scratch*")
1571                    (insert (substitute-command-keys
1572                             "\nType \\[recenter] to begin editing your file.\n")))
1573    
1574                (if (display-mouse-p)                (if (display-mouse-p)
1575                    ;; The user can use the mouse to activate menus                    ;; The user can use the mouse to activate menus
1576                    ;; so give help in terms of menu items.                    ;; so give help in terms of menu items.

Legend:
Removed from v.1.279  
changed lines
  Added in v.1.280

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26