diff options
| author | Darren Hoo | 2014-01-30 20:58:51 -0500 |
|---|---|---|
| committer | Glenn Morris | 2014-01-30 20:58:51 -0500 |
| commit | 0a25002dc2abfd77cd1c227942df3e77321d398d (patch) | |
| tree | 48ea8c8a927ad3b116406314b70248253ae4cd5f | |
| parent | 4e2b87d871a623ec36206dff573bf76df8eca12d (diff) | |
| download | emacs-0a25002dc2abfd77cd1c227942df3e77321d398d.tar.gz 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
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/startup.el | 39 |
2 files changed, 26 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a073a1ae32..c647ba0783b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-01-31 Darren Hoo <darren.hoo@gmail.com> | ||
| 2 | |||
| 3 | * startup.el (fancy-splash-image-file): New function, | ||
| 4 | split from fancy-splash-head. | ||
| 5 | (fancy-splash-head, use-fancy-splash-screens-p): Use it, | ||
| 6 | so that we are both using the same image. (Bug#16574) | ||
| 7 | |||
| 1 | 2014-01-30 Glenn Morris <rgm@gnu.org> | 8 | 2014-01-30 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * simple.el (eval-expression): Doc fix. | 10 | * simple.el (eval-expression): Doc fix. |
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." | |||
| 1590 | 1590 | ||
| 1591 | (declare-function image-size "image.c" (spec &optional pixels frame)) | 1591 | (declare-function image-size "image.c" (spec &optional pixels frame)) |
| 1592 | 1592 | ||
| 1593 | (defun fancy-splash-image-file () | ||
| 1594 | (cond ((stringp fancy-splash-image) fancy-splash-image) | ||
| 1595 | ((display-color-p) | ||
| 1596 | (cond ((<= (display-planes) 8) | ||
| 1597 | (if (image-type-available-p 'xpm) | ||
| 1598 | "splash.xpm" | ||
| 1599 | "splash.pbm")) | ||
| 1600 | ((or (image-type-available-p 'svg) | ||
| 1601 | (image-type-available-p 'imagemagick)) | ||
| 1602 | "splash.svg") | ||
| 1603 | ((image-type-available-p 'png) | ||
| 1604 | "splash.png") | ||
| 1605 | ((image-type-available-p 'xpm) | ||
| 1606 | "splash.xpm") | ||
| 1607 | (t "splash.pbm"))) | ||
| 1608 | (t "splash.pbm"))) | ||
| 1609 | |||
| 1593 | (defun fancy-splash-head () | 1610 | (defun fancy-splash-head () |
| 1594 | "Insert the head part of the splash screen into the current buffer." | 1611 | "Insert the head part of the splash screen into the current buffer." |
| 1595 | (let* ((image-file (cond ((stringp fancy-splash-image) | 1612 | (let* ((image-file (fancy-splash-image-file)) |
| 1596 | fancy-splash-image) | ||
| 1597 | ((display-color-p) | ||
| 1598 | (cond ((<= (display-planes) 8) | ||
| 1599 | (if (image-type-available-p 'xpm) | ||
| 1600 | "splash.xpm" | ||
| 1601 | "splash.pbm")) | ||
| 1602 | ((or (image-type-available-p 'svg) | ||
| 1603 | (image-type-available-p 'imagemagick)) | ||
| 1604 | "splash.svg") | ||
| 1605 | ((image-type-available-p 'png) | ||
| 1606 | "splash.png") | ||
| 1607 | ((image-type-available-p 'xpm) | ||
| 1608 | "splash.xpm") | ||
| 1609 | (t "splash.pbm"))) | ||
| 1610 | (t "splash.pbm"))) | ||
| 1611 | (img (create-image image-file)) | 1613 | (img (create-image image-file)) |
| 1612 | (image-width (and img (car (image-size img)))) | 1614 | (image-width (and img (car (image-size img)))) |
| 1613 | (window-width (window-width))) | 1615 | (window-width (window-width))) |
| @@ -1811,10 +1813,7 @@ we put it on this frame." | |||
| 1811 | (image-type-available-p 'pbm))) | 1813 | (image-type-available-p 'pbm))) |
| 1812 | (let ((frame (fancy-splash-frame))) | 1814 | (let ((frame (fancy-splash-frame))) |
| 1813 | (when frame | 1815 | (when frame |
| 1814 | (let* ((img (create-image (or fancy-splash-image | 1816 | (let* ((img (create-image (fancy-splash-image-file))) |
| 1815 | (if (and (display-color-p) | ||
| 1816 | (image-type-available-p 'xpm)) | ||
| 1817 | "splash.xpm" "splash.pbm")))) | ||
| 1818 | (image-height (and img (cdr (image-size img nil frame)))) | 1817 | (image-height (and img (cdr (image-size img nil frame)))) |
| 1819 | ;; We test frame-height so that, if the frame is split | 1818 | ;; We test frame-height so that, if the frame is split |
| 1820 | ;; by displaying a warning, that doesn't cause the normal | 1819 | ;; by displaying a warning, that doesn't cause the normal |