Mercurial > emacs
changeset 31769:33409fc6f40f
(fancy-splash-image): Change :type.
(fancy-splash-head): Use an XBM image if appropriate.
(command-line-1): Show splash screens in more cases.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 20 Sep 2000 14:06:56 +0000 |
parents | 5f91cf9127a6 |
children | 89fcb6926a97 |
files | lisp/startup.el |
diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Wed Sep 20 13:51:22 2000 +0000 +++ b/lisp/startup.el Wed Sep 20 14:06:56 2000 +0000 @@ -885,10 +885,11 @@ :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 @@ (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 @@ (defun fancy-splash-screens () + "Display splash screens when Emacs starts." (let* ((old-cursor-type cursor-type) stop) (unwind-protect @@ -1035,8 +1040,9 @@ (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 "\