diff options
author | Darren Hoo <darren.hoo@gmail.com> | 2014-01-30 20:58:51 -0500 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-01-30 20:58:51 -0500 |
commit | 0a25002dc2abfd77cd1c227942df3e77321d398d (patch) | |
tree | 48ea8c8a927ad3b116406314b70248253ae4cd5f /lisp/startup.el | |
parent | 4e2b87d871a623ec36206dff573bf76df8eca12d (diff) | |
download | emacs-0a25002dc2abfd77cd1c227942df3e77321d398d.tar.gz emacs-0a25002dc2abfd77cd1c227942df3e77321d398d.tar.bz2 emacs-0a25002dc2abfd77cd1c227942df3e77321d398d.zip |
Fix for fancy-splash image inconsistency
* lisp/startup.el (fancy-splash-image-file): New function,
split from fancy-splash-head.
(fancy-splash-head, use-fancy-splash-screens-p): Use it,
so that we are both using the same image.
Fixes: debbugs:16574
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 98b6d20c83d..b035947cccd 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1590,24 +1590,26 @@ a face or button specification." (declare-function image-size "image.c" (spec &optional pixels frame)) +(defun fancy-splash-image-file () + (cond ((stringp fancy-splash-image) fancy-splash-image) + ((display-color-p) + (cond ((<= (display-planes) 8) + (if (image-type-available-p 'xpm) + "splash.xpm" + "splash.pbm")) + ((or (image-type-available-p 'svg) + (image-type-available-p 'imagemagick)) + "splash.svg") + ((image-type-available-p 'png) + "splash.png") + ((image-type-available-p 'xpm) + "splash.xpm") + (t "splash.pbm"))) + (t "splash.pbm"))) + (defun fancy-splash-head () "Insert the head part of the splash screen into the current buffer." - (let* ((image-file (cond ((stringp fancy-splash-image) - fancy-splash-image) - ((display-color-p) - (cond ((<= (display-planes) 8) - (if (image-type-available-p 'xpm) - "splash.xpm" - "splash.pbm")) - ((or (image-type-available-p 'svg) - (image-type-available-p 'imagemagick)) - "splash.svg") - ((image-type-available-p 'png) - "splash.png") - ((image-type-available-p 'xpm) - "splash.xpm") - (t "splash.pbm"))) - (t "splash.pbm"))) + (let* ((image-file (fancy-splash-image-file)) (img (create-image image-file)) (image-width (and img (car (image-size img)))) (window-width (window-width))) @@ -1811,10 +1813,7 @@ we put it on this frame." (image-type-available-p 'pbm))) (let ((frame (fancy-splash-frame))) (when frame - (let* ((img (create-image (or fancy-splash-image - (if (and (display-color-p) - (image-type-available-p 'xpm)) - "splash.xpm" "splash.pbm")))) + (let* ((img (create-image (fancy-splash-image-file))) (image-height (and img (cdr (image-size img nil frame)))) ;; We test frame-height so that, if the frame is split ;; by displaying a warning, that doesn't cause the normal |