emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b94f01a: Fix error in display-startup-screen


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master b94f01a: Fix error in display-startup-screen
Date: Thu, 26 Sep 2019 12:27:15 -0400 (EDT)

branch: master
commit b94f01a6165908d9f8b0d48653fdc8d75be4dd08
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix error in display-startup-screen
    
    * lisp/startup.el (use-fancy-splash-screens-p): Fix error in
    display-startup-screen if create-image fails (bug#22072).
---
 lisp/startup.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 4078f23..6e2094d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1974,16 +1974,16 @@ we put it on this frame."
                  (image-type-available-p 'pbm)))
     (let ((frame (fancy-splash-frame)))
       (when frame
-       (let* ((img (create-image (fancy-splash-image-file)))
-              (image-height (and img (cdr (image-size img nil frame))))
-              ;; We test frame-height and not window-height so that,
-              ;; if the frame is split by displaying a warning, that
-              ;; doesn't cause the normal splash screen to be used.
-              ;; We subtract 2 from frame-height to account for the
-              ;; echo area and the mode line.
-              (frame-height (- (frame-height frame) 2)))
-         (> frame-height (+ image-height 19)))))))
-
+       (let ((img (create-image (fancy-splash-image-file))))
+          (when img
+            (let ((image-height (cdr (image-size img nil frame)))
+                 ;; We test frame-height and not window-height so that,
+                 ;; if the frame is split by displaying a warning, that
+                 ;; doesn't cause the normal splash screen to be used.
+                 ;; We subtract 2 from frame-height to account for the
+                 ;; echo area and the mode line.
+                 (frame-height (- (frame-height frame) 2)))
+             (> frame-height (+ image-height 19)))))))))
 
 (defun normal-splash-screen (&optional startup concise)
   "Display non-graphic splash screen.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]