]> git.eshelyaron.com Git - emacs.git/commitdiff
(use-fancy-splash-screens-p): New function.
authorGerd Moellmann <gerd@gnu.org>
Sat, 2 Dec 2000 20:19:39 +0000 (20:19 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sat, 2 Dec 2000 20:19:39 +0000 (20:19 +0000)
(command-line-1): Use it to determine whether or not to use
a fancy splash screen.

lisp/ChangeLog
lisp/startup.el

index 2b00f4598bd966edc2347adfab76390b22c5f19a..f7b03c122b15efb3552cb9eac5b7fd162c575740 100644 (file)
@@ -1,3 +1,9 @@
+2000-12-02  Gerd Moellmann  <gerd@gnu.org>
+
+       * startup.el (use-fancy-splash-screens-p): New function.
+       (command-line-1): Use it to determine whether or not to use
+       a fancy splash screen.
+
 2000-12-02  Andreas Schwab  <schwab@suse.de>
 
        * emacs-lisp/eldoc.el (eldoc): Don't make parent of itself.
@@ -14,7 +20,7 @@
        with numeric argument.  Docstring fix.
        (toplevel): Require cl when compiling.
        
-       * internat/mule.el (make-char): Doc fix.
+       * international/mule.el (make-char): Doc fix.
 
 2000-12-02  Jason Rumney  <jasonr@gnu.org>
 
index f4550310a871cef0c7a3b41a1c7b3cd3cb194963..40e0a5f02c304636985f3aa1183bd6ed891eaa90 100644 (file)
@@ -1153,6 +1153,20 @@ where FACE is a valid face specification, as it can be used with
          (kill-buffer splash-buffer)))))
 
 
+(defun use-fancy-splash-screens-p ()
+  "Return t if fancy splash screens should be used."
+  (when (or (and (display-color-p)
+                (image-type-available-p 'xpm))
+           (image-type-available-p 'pbm))
+    (let* ((img (create-image (or fancy-splash-image
+                                 (if (and (display-color-p)
+                                          (image-type-available-p 'xpm))
+                                     "splash.xpm" "splash.pbm"))))
+          (image-height (and img (cdr (image-size img))))
+          (window-height (1- (window-height (selected-window)))))
+      (> window-height (+ image-height 14)))))
+
+
 (defun startup-echo-area-message ()
   (if (eq (key-binding "\C-h\C-p") 'describe-project)
       "For information about the GNU Project and its goals, type C-h C-p."
@@ -1241,9 +1255,7 @@ where FACE is a valid face specification, as it can be used with
                       
                       (if (assq 'display (frame-parameters))
                           
-                          (if (or (and (display-color-p)
-                                       (image-type-available-p 'xpm))
-                                  (image-type-available-p 'pbm))
+                          (if (use-fancy-splash-screens-p)
                               (progn
                                 (setq wait-for-input nil)
                                 (fancy-splash-screens))