From: Gerd Moellmann Date: Wed, 20 Sep 2000 14:06:56 +0000 (+0000) Subject: (fancy-splash-image): Change :type. X-Git-Tag: emacs-pretest-21.0.90~1487 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ad8561be3e67587715b2b038642030a4399a389;p=emacs.git (fancy-splash-image): Change :type. (fancy-splash-head): Use an XBM image if appropriate. (command-line-1): Show splash screens in more cases. --- diff --git a/lisp/startup.el b/lisp/startup.el index f793b84e63e..d57e1e72bea 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -885,10 +885,11 @@ Each element in the list should be a list of strings or pairs :type 'integer) -(defcustom fancy-splash-image "splash.xpm" - "*The image to show in the splash screens." +(defcustom fancy-splash-image nil + "*The image to show in the splash screens, or nil for defaults." :group 'fancy-splash-screen - :type 'file) + :type '(choice (const :tag "Default" nil) + (file :tag "File"))) (defun fancy-splash-insert (&rest args) @@ -906,14 +907,17 @@ where FACE is a valid face specification, as it can be used with (defun fancy-splash-head () "Insert the head part of the splash screen into the current buffer." - (let* ((img (create-image fancy-splash-image)) + (let* ((img (create-image (or fancy-splash-image + (if (display-color-p) + "splash.xpm" "splash.xbm")))) (image-width (and img (car (image-size img)))) (window-width (window-width (selected-window)))) (when img (when (> window-width image-width) (let ((pos (/ (- window-width image-width) 2))) (insert (propertize " " 'display `(space :align-to ,pos)))) - (when (eq (frame-parameter nil 'background-mode) 'dark) + (when (and (memq 'xpm img) + (eq (frame-parameter nil 'background-mode) 'dark)) (setq img (append img '(:color-symbols (("#000000" . "gray")))))) (insert-image img) (insert "\n")))) @@ -936,6 +940,7 @@ where FACE is a valid face specification, as it can be used with (defun fancy-splash-screens () + "Display splash screens when Emacs starts." (let* ((old-cursor-type cursor-type) stop) (unwind-protect @@ -1035,8 +1040,9 @@ where FACE is a valid face specification, as it can be used with (insert ", one component of a Linux-based GNU system.")) (insert "\n") (if (assq 'display (frame-parameters)) - (if (and (display-color-p) - (image-type-available-p 'xpm)) + (if (or (and (display-color-p) + (image-type-available-p 'xpm)) + (image-type-available-p 'xbm)) (fancy-splash-screens) (progn (insert "\